8e72f5b
Summary:       The gerrit client tools
8e72f5b
Name:          gerrymander
fe358f0
Version:       1.5
8f2f712
Release:       12%{?dist}
9818f42
Source0:       https://pypi.python.org/packages/source/g/%{name}/%{name}-%{version}.tar.gz
9818f42
URL:           https://pypi.python.org/pypi/gerrymander
8e72f5b
License:       ASL 2.0
8e72f5b
Group:         Development/Libraries
8e72f5b
8e72f5b
BuildArch:     noarch
8e72f5b
BuildRequires: python2-devel
9bdbe77
BuildRequires: python2-nose
8e72f5b
8e72f5b
BuildRequires: python3-nose
8e72f5b
BuildRequires: python3-devel
8e72f5b
Requires:      python3-gerrymander
8e72f5b
7f6a53d
%package -n python2-gerrymander
7f6a53d
%{?python_provide:%python_provide python2-gerrymander}
8e72f5b
Summary: The gerrit python2 client
8e72f5b
License: GPLv2+
9bdbe77
Requires: python2-prettytable
8e72f5b
Group: Development/Libraries
8e72f5b
8e72f5b
%package -n python3-gerrymander
8e72f5b
Summary: The gerrit python3 client
8e72f5b
License: GPLv2+
e88949a
Requires: python3-prettytable
8e72f5b
Group: Development/Libraries
8e72f5b
e88949a
8e72f5b
%description
8e72f5b
The gerrymander package provides a set of command line tools
8e72f5b
for interacting with Gerrit
8e72f5b
7f6a53d
%description -n python2-gerrymander
8e72f5b
The python2-gerrymander package provides a set of python2
8e72f5b
modules for interacting with Gerrit.
8e72f5b
8e72f5b
%description -n python3-gerrymander
8e72f5b
The python3-gerrymander package provides a set of python3
8e72f5b
modules for interacting with Gerrit.
8e72f5b
8e72f5b
%prep
8e72f5b
%setup -q
8e72f5b
8e72f5b
rm -rf %{py3dir}
8e72f5b
cp -a . %{py3dir}
8e72f5b
find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
8e72f5b
8e72f5b
# Remove any egg info (as of submitting this review, there's no bundled
8e72f5b
# egg info)
8e72f5b
rm -rf *.egg-info
8e72f5b
8e72f5b
%build
8e72f5b
%{__python2} setup.py build
8e72f5b
8e72f5b
%{__python3} setup.py build
8e72f5b
8e72f5b
%install
8e72f5b
%{__python2} setup.py install --skip-build --root=%{buildroot}
8e72f5b
Iryna Shcherbina fc80b1e
# The Python 2 installation process installs its own version
Iryna Shcherbina fc80b1e
# of the application. As we only want to package the Python 3 version of the
Iryna Shcherbina fc80b1e
# application, we delete the Python 2 executable(s) so that the Python 3
Iryna Shcherbina fc80b1e
# version(s) can take their place afterwards.
Iryna Shcherbina fc80b1e
rm %{buildroot}%{_bindir}/*
Iryna Shcherbina fc80b1e
8e72f5b
%{__python3} setup.py install --skip-build --root=%{buildroot}
8e72f5b
8e72f5b
%check
06b9766
# setup.py's integration does 'python3 /usr/bin/nosetests', which isn't
06b9766
# going to work. So we'll just call nosetests ourselves.
06b9766
nosetests-%{python2_version}
8e72f5b
06b9766
nosetests-%{python3_version}
8e72f5b
8e72f5b
%files
8e72f5b
%doc conf/gerrymander.conf-example
8e72f5b
%{_bindir}/gerrymander
8e72f5b
7f6a53d
%files -n python2-gerrymander
8e72f5b
%doc README LICENSE
8e72f5b
%{python2_sitelib}/gerrymander/
8e72f5b
%{python2_sitelib}/%{name}-%{version}-py2.7.egg-info
8e72f5b
8e72f5b
%files -n python3-gerrymander
8e72f5b
%doc README LICENSE
8e72f5b
%{python3_sitelib}/gerrymander/
8e72f5b
%{python3_sitelib}/%{name}-%{version}-py3.*.egg-info
8e72f5b
8e72f5b
%changelog
8f2f712
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.5-12
8f2f712
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
8f2f712
ef71169
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 1.5-11
ef71169
- Rebuilt for Python 3.7
ef71169
ea5a420
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.5-10
ea5a420
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
ea5a420
9bdbe77
* Fri Jan 05 2018 Iryna Shcherbina <ishcherb@redhat.com> - 1.5-9
9bdbe77
- Update Python 2 dependency declarations to new packaging standards
9bdbe77
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
9bdbe77
7f6a53d
* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.5-8
7f6a53d
- Python 2 binary package renamed to python2-gerrymander
7f6a53d
  See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3
7f6a53d
8a53ea3
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.5-7
8a53ea3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
8a53ea3
Iryna Shcherbina fc80b1e
* Thu Feb 16 2017 Iryna Shcherbina <ishcherb@redhat.com> - 1.5-6
Iryna Shcherbina fc80b1e
- Fix Python 2 dependency in gerrymander (RHBZ#1422897)
Iryna Shcherbina fc80b1e
65d9dff
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.5-5
65d9dff
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
65d9dff
71c316c
* Wed Dec 28 2016 Adam Williamson <awilliam@redhat.com> - 1.5.4
06b9766
- fix test invocation for Python 3
06b9766
06b9766
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com>
5f4bcbc
- Rebuild for Python 3.6
5f4bcbc
9f25a96
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5-3
9f25a96
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
9f25a96
e88949a
* Mon Feb 29 2016 Kashyap Chamarthy <kashyapc@fedoraproject.org> - 1.5.2
e88949a
- Add the Python PrettyTable dependency to relevant sub-packages
e88949a
  (Thanks, Daniel Berrange, Matthew Booth)
e88949a
fe358f0
* Mon Feb 22 2016 Kashyap Chamarthy <kashyapc@fedoraproject.org> - 1.5.1
fe358f0
- New upstream release 1.5
fe358f0
d4f37c2
* Tue Feb 16 2016 Kashyap Chamarthy <kashyapc@fedoraproject.org> - 1.4.5
d4f37c2
- Add 'python-prettytable' to 'Requires'; fixes rhbz# 1307167
d4f37c2
97ca132
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.4-4
97ca132
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
97ca132
8ebbab1
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4-3
8ebbab1
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
8ebbab1
ed2e36b
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4-2
ed2e36b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
ed2e36b
9818f42
* Fri Jan 09 2015 Kashyap Chamarthy <kashyapc@fedoraproject.org> - 1.4.1
9818f42
- Update to new upstream release 1.4
9818f42
- Change the official source to pypi (from github generated tarballs)
9818f42
- Change the URL to pypi
9818f42
8e72f5b
* Wed Aug 20 2014 Kashyap Chamarthy <kashyapc@fedoraproject.org> - 1.3.4
8e72f5b
- Remove with_python3 conditional, as current Fedora releases have it
8e72f5b
8e72f5b
* Tue Aug 19 2014 Kashyap Chamarthy <kashyapc@fedoraproject.org> - 1.3.3
8e72f5b
- Update %%files section correctly
8e72f5b
8e72f5b
* Mon Aug 18 2014 Kashyap Chamarthy <kashyapc@fedoraproject.org> - 1.3.2
8e72f5b
- Address review comments from rhbz# 1128253
8e72f5b
8e72f5b
* Tue Aug 05 2014 Kashyap Chamarthy <kashyapc@fedoraproject.org> - 1.3-1
8e72f5b
- Initial package