%global with_python3 1 Summary: The gerrit client tools Name: gerrymander Version: 1.3 Release: 3%{?dist} Source0: https://github.com/berrange/%{name}/archive/v%{version}.tar.gz URL: http://github.com/berrange/gerrymander License: ASL 2.0 Group: Development/Libraries BuildArch: noarch BuildRequires: python2-devel BuildRequires: python-nose %if 0%{with_python3} BuildRequires: python3-nose BuildRequires: python3-devel Requires: python3-gerrymander %endif %package -n python-gerrymander Summary: The gerrit python2 client License: GPLv2+ Group: Development/Libraries Requires: gerrymander %if 0%{with_python3} %package -n python3-gerrymander Summary: The gerrit python3 client License: GPLv2+ Group: Development/Libraries Requires: gerrymander %endif %description The gerrymander package provides a set of command line tools for interacting with Gerrit %description -n python-gerrymander The python2-gerrymander package provides a set of python2 modules for interacting with Gerrit. %if 0%{with_python3} %description -n python3-gerrymander The python3-gerrymander package provides a set of python3 modules for interacting with Gerrit. %endif %prep %setup -q # Remove any egg info (as of submitting this review, there's no bundled # egg info) rm -rf *.egg-info %build %{__python2} setup.py build %if 0%{with_python3} echo ${_python3} %{__python3} setup.py build %endif %install %{__python2} setup.py install --skip-build --root=%{buildroot} %if 0%{with_python3} %{__python3} setup.py install --skip-build --root=%{buildroot} %endif %check %{__python2} setup.py test %if 0%{with_python3} %{__python3} setup.py test %endif %files %doc conf/gerrymander.conf-example %{_bindir}/gerrymander %doc README LICENSE %files -n python-gerrymander %doc %{python2_sitelib}/gerrymander/ %{python2_sitelib}/%{name}-%{version}-py2.7.egg-info %if 0%{?with_python3} %files -n python3-gerrymander %doc %{python3_sitelib}/gerrymander/ %{python3_sitelib}/%{name}-%{version}-py3.*.egg-info %endif %changelog * Tue Aug 19 2014 Kashyap Chamarthy - 1.3.3 - Update %%files section correctly and add correct "Requires" * Mon Aug 18 2014 Kashyap Chamarthy - 1.3.2 - Address review comments from rhbz# 1128253 * Tue Aug 05 2014 Kashyap Chamarthy - 1.3-1 - Initial package