3cb8a04
%global pypi_name PyGithub
3cb8a04
%global with_python3 1
3cb8a04
3cb8a04
Name:           python-%{pypi_name}
6369427
Version:        1.27.1
6369427
Release:        1%{?dist}
3cb8a04
Summary:        Python library to work with the Github API
3cb8a04
3cb8a04
Group:          Development/Languages
3cb8a04
License:        LGPLv3+
3cb8a04
URL:            http://vincent-jacques.net/%{pypi_name}
3cb8a04
Source:         http://pypi.python.org/packages/source/P/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
3cb8a04
3cb8a04
BuildArch:      noarch
3cb8a04
BuildRequires:  python-devel
3cb8a04
BuildRequires:  python-setuptools
3cb8a04
3cb8a04
Obsoletes:      python-github < 1.11.1-4
3cb8a04
Provides:       python-github
3cb8a04
3cb8a04
%if 0%{?with_python3}
3cb8a04
BuildRequires:  python3-devel
3cb8a04
BuildRequires:  python3-setuptools
3cb8a04
%endif # if with_python3
3cb8a04
3cb8a04
%description
3cb8a04
A Python library implementing the full Github API v3.
3cb8a04
3cb8a04
%if 0%{?with_python3}
a1ab1c5
%package -n     python3-PyGithub
3cb8a04
Summary:        Python library to work with the Github API
3cb8a04
Group:          Development/Languages
3cb8a04
a1ab1c5
Obsoletes:      python3-github < 1.25.2-2
3cb8a04
Provides:       python3-github
3cb8a04
a1ab1c5
%description -n python3-PyGithub
3cb8a04
A Python library implementing the full Github API v3.
3cb8a04
%endif # with_python3
3cb8a04
3cb8a04
%prep
3cb8a04
%setup -q -n %{pypi_name}-%{version}
3cb8a04
# this test needs network connection => kill it for Koji builds
3cb8a04
sed -i '/from Issue142 import \*/d' github/tests/AllTests.py
3cb8a04
3cb8a04
%if 0%{?with_python3}
3cb8a04
rm -rf %{py3dir}
3cb8a04
cp -a . %{py3dir}
3cb8a04
%endif # with_python3
3cb8a04
3cb8a04
%build
6302021
%py2_build
3cb8a04
# don't keep these files in the library itself in RPM package
3cb8a04
3cb8a04
%if 0%{?with_python3}
3cb8a04
pushd %{py3dir}
6302021
%py3_build
3cb8a04
popd
3cb8a04
%endif # with_python3
3cb8a04
3cb8a04
%install
3cb8a04
%if 0%{?with_python3}
3cb8a04
pushd %{py3dir}
6302021
%py3_install
3cb8a04
popd
3cb8a04
%endif # with_python3
3cb8a04
6302021
%py2_install
3cb8a04
3cb8a04
%check
3cb8a04
%{__python} setup.py test
3cb8a04
3cb8a04
%if 0%{?with_python3}
3cb8a04
pushd %{py3dir}
3cb8a04
%{__python3} setup.py test
3cb8a04
popd
3cb8a04
%endif
3cb8a04
3cb8a04
%files
6302021
%{license} COPYING COPYING.LESSER
6302021
%doc README.md
3cb8a04
%{python_sitelib}/*
3cb8a04
%exclude %{python_sitelib}/github/tests
3cb8a04
3cb8a04
%if 0%{?with_python3}
a1ab1c5
%files -n python3-PyGithub
6302021
%{license} COPYING COPYING.LESSER
6302021
%doc README.md
3cb8a04
%{python3_sitelib}/*
3cb8a04
%exclude %{python3_sitelib}/github/tests
3cb8a04
%endif
3cb8a04
3cb8a04
%changelog
6369427
* Fri Aug 12 2016 Jiri Popelka <jpopelka@redhat.com> - 1.27.1-1
6369427
- Update to 1.27.1
6302021
- Use macros
6369427
61009c7
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.26.0-3
61009c7
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
61009c7
c6c9d69
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.26.0-2
c6c9d69
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
c6c9d69
821a945
* Sun Nov 15 2015 Slavek Kabrda <bkabrda@redhat.com> - 1.26.0-1
821a945
- Update to 1.26.0
821a945
9409449
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.25.2-4
9409449
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
9409449
b9166f5
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.25.2-3
b9166f5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
b9166f5
a1ab1c5
* Wed Nov 05 2014 Slavek Kabrda <bkabrda@redhat.com> - 1.25.2-2
a1ab1c5
- Rename python3- subpackage to python3-PyGithub to match python2 package
a1ab1c5
(Obsoletes/Provides will handle update path)
a1ab1c5
2ad0563
* Tue Sep 30 2014 Tomas Radej <tradej@redhat.com> - 1.25.2-1
2ad0563
- Updated to latest upstream version
2ad0563
15b99e9
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.25.0-2
15b99e9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
15b99e9
e8194b1
* Tue May 13 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 1.25.0-1
e8194b1
- Updated to 1.25.0.
e8194b1
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
e8194b1
4955fb2
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.14.2-3
4955fb2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
4955fb2
3cb8a04
* Thu May 02 2013 Bohuslav Kabrda <bkabrda@redhat.com> - 1.14.2-2
3cb8a04
- Don't run test needing internet connection (fails in Koji).
3cb8a04
3cb8a04
* Thu May 02 2013 Bohuslav Kabrda <bkabrda@redhat.com> - 1.14.2-1
3cb8a04
- Renamed to python-PyGithub (the previous name wasn't formed according
3cb8a04
to Fedora naming guidelines).
3cb8a04
- Updated to 1.14.2.
3cb8a04
3cb8a04
* Tue Mar 19 2013 Bohuslav Kabrda <bkabrda@redhat.com> - 1.11.1-3
3cb8a04
- Specfile cleanup.
3cb8a04
- Introduce python3 subpackage.
3cb8a04
3cb8a04
* Wed Feb 20 2013 Jiri Moskovcak <jmoskovc@redhat.com> - 1.11.1-2
3cb8a04
- updated according to the review rhbz#910565 c#4
3cb8a04
3cb8a04
* Tue Feb 12 2013 Jiri Moskovcak <jmoskovc@redhat.com> - 1.11.1-1
3cb8a04
- updated to the latest upstream
3cb8a04
3cb8a04
* Sun Feb 03 2013 Jiri Moskovcak <jmoskovc@redhat.com> - 1.10.0-1
3cb8a04
- Initial package