35e43c3
# what it's called on pypi
35e43c3
%global srcname PyGithub
35e43c3
# what it's imported as
35e43c3
%global libname github
35e43c3
# name of egg info directory
35e43c3
%global eggname %{srcname}
35e43c3
# package name fragment
35e43c3
%global pkgname pygithub
3cb8a04
8568e4f
%bcond_without python2
8568e4f
%bcond_without python3
8568e4f
35e43c3
Name:           python-%{srcname}
8d438dc
Version:        1.39
c694d6d
Release:        4%{?dist}
3cb8a04
Summary:        Python library to work with the Github API
3cb8a04
License:        LGPLv3+
6ef379c
URL:            https://github.com/PyGithub/PyGithub
35e43c3
Source0:        %pypi_source
3cb8a04
BuildArch:      noarch
3cb8a04
1531af9
%global _description \
3cb8a04
A Python library implementing the full Github API v3.
3cb8a04
1531af9
%description %{_description}
52b9969
8568e4f
%if %{with python2}
35e43c3
%package -n     python2-%{pkgname}
1531af9
Summary:        %{summary}
8568e4f
BuildRequires:  python2-devel
8568e4f
BuildRequires:  python2-setuptools
8568e4f
BuildRequires:  python%{?fedora:2}-jwt
8568e4f
Requires:       python%{?fedora:2}-jwt
24f810c
Provides:       python-github = %{version}-%{release}
52b9969
Obsoletes:      python-github < 1.11.1-4
24f810c
Provides:       python-PyGithub = %{version}-%{release}
d37a875
Obsoletes:      python-PyGithub < 1.29-8
35e43c3
%{?python_provide:%python_provide python2-%{pkgname}}
52b9969
35e43c3
%description -n python2-%{pkgname} %{_description}
8568e4f
%endif
52b9969
8568e4f
%if %{with python3}
35e43c3
%package -n     python%{python3_pkgversion}-%{pkgname}
1531af9
Summary:        %{summary}
8568e4f
BuildRequires:  python%{python3_pkgversion}-devel
8568e4f
BuildRequires:  python%{python3_pkgversion}-setuptools
8568e4f
BuildRequires:  python%{python3_pkgversion}-jwt
8568e4f
Requires:       python%{python3_pkgversion}-jwt
2c73ab9
Provides:       python%{python3_pkgversion}-github = %{version}-%{release}
2c73ab9
Obsoletes:      python%{python3_pkgversion}-github < 1.25.2-2
2c73ab9
Provides:       python%{python3_pkgversion}-PyGithub = %{version}-%{release}
2c73ab9
Obsoletes:      python%{python3_pkgversion}-PyGithub < 1.29-8
35e43c3
%{?python_provide:%python_provide python%{python3_pkgversion}-%{pkgname}}
3cb8a04
35e43c3
%description -n python%{python3_pkgversion}-%{pkgname} %{_description}
8568e4f
%endif
3cb8a04
3cb8a04
%prep
35e43c3
%setup -q -n %{srcname}-%{version}
35e43c3
rm -rf %{eggname}.egg-info
3cb8a04
# this test needs network connection => kill it for Koji builds
3cb8a04
sed -i '/from Issue142 import \*/d' github/tests/AllTests.py
3cb8a04
8568e4f
%if %{with python3}
3cb8a04
rm -rf %{py3dir}
3cb8a04
cp -a . %{py3dir}
8568e4f
%endif
3cb8a04
3cb8a04
%build
8568e4f
%if %{with python2}
6302021
%py2_build
8568e4f
%endif
3cb8a04
8568e4f
%if %{with python3}
3cb8a04
pushd %{py3dir}
6302021
%py3_build
3cb8a04
popd
8568e4f
%endif
3cb8a04
3cb8a04
%install
8568e4f
%if %{with python2}
1531af9
%py2_install
8568e4f
%endif
1531af9
8568e4f
%if %{with python3}
3cb8a04
pushd %{py3dir}
6302021
%py3_install
3cb8a04
popd
8568e4f
%endif
3cb8a04
3cb8a04
%check
8568e4f
%if %{with python2}
24f810c
%{__python2} setup.py test
8568e4f
%endif
3cb8a04
8568e4f
%if %{with python3}
3cb8a04
pushd %{py3dir}
3cb8a04
%{__python3} setup.py test
3cb8a04
popd
8568e4f
%endif
3cb8a04
8568e4f
%if %{with python2}
35e43c3
%files -n python2-%{pkgname}
1531af9
%license COPYING COPYING.LESSER
6302021
%doc README.md
35e43c3
%{python2_sitelib}/%{libname}
35e43c3
%exclude %{python2_sitelib}/%{libname}/tests
35e43c3
%{python2_sitelib}/%{eggname}-%{version}-py%{python2_version}.egg-info
8568e4f
%endif
3cb8a04
8568e4f
%if %{with python3}
35e43c3
%files -n python%{python3_pkgversion}-%{pkgname}
1531af9
%license COPYING COPYING.LESSER
6302021
%doc README.md
35e43c3
%{python3_sitelib}/%{libname}
35e43c3
%exclude %{python3_sitelib}/%{libname}/tests
35e43c3
%{python3_sitelib}/%{eggname}-%{version}-py%{python3_version}.egg-info
8568e4f
%endif
3cb8a04
3cb8a04
%changelog
c694d6d
* Wed Oct 03 2018 Carl George <carl@george.computer> - 1.39-4
c694d6d
- Require python-jwt on RHEL, python2-jwt on Fedora
c694d6d
7428dc2
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.39-3
7428dc2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
7428dc2
423bfa7
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 1.39-2
423bfa7
- Rebuilt for Python 3.7
423bfa7
8d438dc
* Tue Apr 10 2018 Carl George <carl@george.computer> - 1.39-1
8d438dc
- Latest upstream
8d438dc
6ef379c
* Thu Apr 05 2018 Carl George <carl@george.computer> - 1.38-1
6ef379c
- Latest upstream
a370669
- Share doc and license dir between subpackages
2c73ab9
- Enable EPEL PY3 build
6ef379c
24f810c
* Wed Apr  4 2018 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.29-8
24f810c
- Add missing Provides/Obsoletes for camelcase name (#1559280)
d37a875
- Rename python3 subpackage to python3-pygithub
24f810c
9195b90
* Fri Feb 09 2018 Iryna Shcherbina <ishcherb@redhat.com> - 1.29-7
9195b90
- Update Python 2 dependency declarations to new packaging standards
9195b90
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
9195b90
c253b1a
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.29-6
c253b1a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
c253b1a
52b9969
* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.29-5
52b9969
- Python 2 binary package renamed to python2-pygithub
52b9969
  See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3
52b9969
b2ddea7
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.29-4
b2ddea7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
b2ddea7
2dc25ae
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.29-3
2dc25ae
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
2dc25ae
7d9fdc0
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 1.29-2
7d9fdc0
- Rebuild for Python 3.6
7d9fdc0
09d55fb
* Thu Oct 06 2016 Jiri Popelka <jpopelka@redhat.com> - 1.29-1
09d55fb
- Update to 1.29
09d55fb
0244ce5
* Mon Sep 12 2016 Jiri Popelka <jpopelka@redhat.com> - 1.28-1
0244ce5
- Update to 1.28
0244ce5
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