!3 remove python2

From: @zhangtao2020
Reviewed-by: @small_leek
Signed-off-by: @small_leek
This commit is contained in:
openeuler-ci-bot 2020-10-31 11:02:59 +08:00 committed by Gitee
commit 94b64fdc68

View File

@ -1,31 +1,19 @@
Name: dogtail
Version: 0.9.10
Release: 2
Release: 3
Summary: Tools for GUI testing automatically
License: GPLv2
URL: https://gitlab.com/dogtail/dogtail/
Source0: https://gitlab.com/dogtail/dogtail/-/archive/DOGTAIL_0_9_10/dogtail-DOGTAIL_0_9_10.tar.gz
BuildArch: noarch
BuildRequires: python2-devel python2-setuptools desktop-file-utils
BuildRequires: desktop-file-utils
%description
GUI test tool and automation framework that uses assistive technologies to
communicate with desktop applications.
It uses Accessibility (a11y) technologies.
%package -n python2-dogtail
Summary: GUI test tool and automation framework - python2
Requires: python2-pyatspi python2-gobject python2-cairo python2-rpm
Requires: xorg-x11-xinit python2-imaging hicolor-icon-theme
%{?python_provide:%python_provide python2-dogtail}
Provides: dogtail = %{version}-%{release}
Obsoletes: dogtail < %{version}-%{release}
%description -n python2-dogtail
GUI test tool and automation framework that uses assistive technologies to
communicate with desktop applications.
%package -n python3-dogtail
Summary: GUI test tool and automation framework - python3 installation
BuildRequires: python3-devel python3-setuptools
@ -42,16 +30,11 @@ rm -rf %{py3dir}
cp -a . %{py3dir}
%build
%{__python2} setup.py build
cd %{py3dir}
%{__python3} setup.py build
cd -
%install
%{__python2} ./setup.py install -O2 --root=$RPM_BUILD_ROOT --record=%{name}.files
rm -rf $RPM_BUILD_ROOT/%{_docdir}/dogtail
rm -rf $RPM_BUILD_ROOT/%{python2_sitelib}/%{name}-%{version}-py%{python2_version}.egg-info
cd %{py3dir}
%{__python3} ./setup.py install -O2 --root=$RPM_BUILD_ROOT --record=%{name}.files
rm -rf $RPM_BUILD_ROOT/%{_docdir}/dogtail
@ -74,15 +57,6 @@ fi
%posttrans
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%files -n python2-dogtail
%{_bindir}/*
%{python2_sitelib}/dogtail/
%{_datadir}/applications/*
%{_datadir}/dogtail/
%{_datadir}/icons/hicolor/*/apps/%{name}*.*
%doc COPYING README NEWS
%doc examples/
%files -n python3-dogtail
%{_bindir}/*
%{python3_sitelib}/dogtail/
@ -93,5 +67,8 @@ fi
%doc examples/
%changelog
* Thu Oct 22 2020 huanghaitao <huanghaitao8@huawei.com> - 0.9.10-3
- Disable python2 module
* Wed Mar 04 2020 yangjian<yangjian79@huawei.com> - 0.9.10-2
- Package init