diff --git a/dogtail.spec b/dogtail.spec index 4ba584c..5318c2d 100644 --- a/dogtail.spec +++ b/dogtail.spec @@ -1,16 +1,19 @@ +%if 0%{?fedora} +%global with_python3 1 +%endif + Summary: GUI test tool and automation framework Name: dogtail -Version: 0.9.0 -Release: 4%{?dist} +Version: 0.9.9 +Release: 1%{?dist} License: GPLv2 URL: http://dogtail.fedorahosted.org/ Source0: http://fedorahosted.org/released/dogtail/%{name}-%{version}.tar.gz - BuildArch: noarch BuildRequires: python2-devel +BuildRequires: python-setuptools BuildRequires: desktop-file-utils - Requires: pyatspi Requires: pygobject3 Requires: pycairo @@ -20,19 +23,56 @@ Requires: python-imaging Requires: hicolor-icon-theme %description -GUI test tool and automation framework that uses assistive technologies to +GUI test tool and automation framework that uses assistive technologies to +communicate with desktop applications. + +%if 0%{?with_python3} +%package -n python3-dogtail +Summary: GUI test tool and automation framework - python3 installation +BuildRequires: python3-devel +BuildRequires: python3-setuptools +Requires: python3-pyatspi +Requires: python3-gobject +Requires: python3-cairo +Requires: rpm-python3 +Requires: xorg-x11-xinit +Requires: hicolor-icon-theme + +%description -n python3-dogtail +GUI test tool and automation framework that uses assistive technologies to communicate with desktop applications. +%endif # with_python3 %prep %setup -q -n %{name}-%{version} +%if 0%{?with_python3} +rm -rf %{py3dir} +cp -a . %{py3dir} +%endif # with_python3 + %build -python ./setup.py build +%{__python2} setup.py build + +%if 0%{?with_python3} +pushd %{py3dir} +%{__python3} setup.py build +popd +%endif # with_python3 %install -python ./setup.py install -O2 --root=$RPM_BUILD_ROOT --record=%{name}.files +%{__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 + +%if 0%{?with_python3} +pushd %{py3dir} +%{__python3} ./setup.py install -O2 --root=$RPM_BUILD_ROOT --record=%{name}.files rm -rf $RPM_BUILD_ROOT/%{_docdir}/dogtail -rm -f $RPM_BUILD_ROOT/%{python_sitelib}/%{name}-%{version}-py%{python_version}.egg-info +rm -rf $RPM_BUILD_ROOT/%{python3_sitelib}/%{name}-%{version}-py%{python3_version}.egg-info +popd +%endif # with_python3 + find examples -type f -exec chmod 0644 \{\} \; desktop-file-install $RPM_BUILD_ROOT/%{_datadir}/applications/sniff.desktop \ --dir=$RPM_BUILD_ROOT/%{_datadir}/applications \ @@ -49,9 +89,9 @@ fi %posttrans /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : -%files +%files -n dogtail %{_bindir}/* -%{python_sitelib}/dogtail/ +%{python2_sitelib}/dogtail/ %{_datadir}/applications/* %{_datadir}/dogtail/ %{_datadir}/icons/hicolor/*/apps/%{name}*.* @@ -60,7 +100,24 @@ fi %doc NEWS %doc examples/ +%if 0%{?with_python3} +%files -n python3-dogtail +%{_bindir}/* +%{python3_sitelib}/dogtail/ +%{_datadir}/applications/* +%{_datadir}/dogtail/ +%{_datadir}/icons/hicolor/*/apps/%{name}*.* +%doc COPYING +%doc README +%doc NEWS +%doc examples/ +%endif # with_python3 + %changelog +* Mon Jan 18 2016 Vitezslav Humpa - 0.9.9-1 +- Update to upstream version 0.9.9 +- Upstream now supports Python 3, built as python3-dogtail sub-package + * Wed Jun 17 2015 Fedora Release Engineering - 0.9.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild @@ -196,7 +253,7 @@ fi - Touch _datadir/icons/hicolor/ before running gtk-update-icon-cache. - Require and use desktop-file-utils. - postun = post. -- Shorten BuildArchitectures to BuildArch. The former worked, but even vim's +- Shorten BuildArchitectures to BuildArch. The former worked, but even vim's hilighting hated it. - Put each *Requires on a separate line. - Remove __os_install_post definition. @@ -209,7 +266,7 @@ fi * Fri Feb 17 2006 Zack Cerza - 0.5.0-2 - It looks like xorg-x11-Xvfb changed names. Require 'Xvfb' instead. -- Remove Requires on python-elementtree, since RHEL4 didn't have it. The +- Remove Requires on python-elementtree, since RHEL4 didn't have it. The functionality it provides is probably never used anyway, and will most likely be removed in the future. - Don't run gtk-update-icon-cache if it doesn't exist. @@ -218,7 +275,7 @@ fi - New upstream release. - Added missing BuildRequires on at-spi-devel. - Added Requires on pyspi >= 0.5.3. -- Added Requires on rpm-python, pygtk2, ImageMagick, xorg-x11-Xvfb, +- Added Requires on rpm-python, pygtk2, ImageMagick, xorg-x11-Xvfb, python-elementtree. - Moved documentation (including examples) to the correct place. - Make sure /usr/share/doc/dogtail is removed.