Blob Blame History Raw
%global pypi_name PyGithub
%global with_python3 1

Name:           python-%{pypi_name}
Version:        1.27.1
Release:        1%{?dist}
Summary:        Python library to work with the Github API

Group:          Development/Languages
License:        LGPLv3+
URL:            http://vincent-jacques.net/%{pypi_name}
Source:         http://pypi.python.org/packages/source/P/%{pypi_name}/%{pypi_name}-%{version}.tar.gz

BuildArch:      noarch
BuildRequires:  python-devel
BuildRequires:  python-setuptools

Obsoletes:      python-github < 1.11.1-4
Provides:       python-github

%if 0%{?with_python3}
BuildRequires:  python3-devel
BuildRequires:  python3-setuptools
%endif # if with_python3

%description
A Python library implementing the full Github API v3.

%if 0%{?with_python3}
%package -n     python3-PyGithub
Summary:        Python library to work with the Github API
Group:          Development/Languages

Obsoletes:      python3-github < 1.25.2-2
Provides:       python3-github

%description -n python3-PyGithub
A Python library implementing the full Github API v3.
%endif # with_python3

%prep
%setup -q -n %{pypi_name}-%{version}
# this test needs network connection => kill it for Koji builds
sed -i '/from Issue142 import \*/d' github/tests/AllTests.py

%if 0%{?with_python3}
rm -rf %{py3dir}
cp -a . %{py3dir}
%endif # with_python3

%build
%py2_build
# don't keep these files in the library itself in RPM package

%if 0%{?with_python3}
pushd %{py3dir}
%py3_build
popd
%endif # with_python3

%install
%if 0%{?with_python3}
pushd %{py3dir}
%py3_install
popd
%endif # with_python3

%py2_install

%check
%{__python} setup.py test

%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py test
popd
%endif

%files
%{license} COPYING COPYING.LESSER
%doc README.md
%{python_sitelib}/*
%exclude %{python_sitelib}/github/tests

%if 0%{?with_python3}
%files -n python3-PyGithub
%{license} COPYING COPYING.LESSER
%doc README.md
%{python3_sitelib}/*
%exclude %{python3_sitelib}/github/tests
%endif

%changelog
* Fri Aug 12 2016 Jiri Popelka <jpopelka@redhat.com> - 1.27.1-1
- Update to 1.27.1
- Use macros

* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.26.0-3
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages

* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.26.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Sun Nov 15 2015 Slavek Kabrda <bkabrda@redhat.com> - 1.26.0-1
- Update to 1.26.0

* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.25.2-4
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5

* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.25.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Wed Nov 05 2014 Slavek Kabrda <bkabrda@redhat.com> - 1.25.2-2
- Rename python3- subpackage to python3-PyGithub to match python2 package
(Obsoletes/Provides will handle update path)

* Tue Sep 30 2014 Tomas Radej <tradej@redhat.com> - 1.25.2-1
- Updated to latest upstream version

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.25.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Tue May 13 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 1.25.0-1
- Updated to 1.25.0.
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4

* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.14.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Thu May 02 2013 Bohuslav Kabrda <bkabrda@redhat.com> - 1.14.2-2
- Don't run test needing internet connection (fails in Koji).

* Thu May 02 2013 Bohuslav Kabrda <bkabrda@redhat.com> - 1.14.2-1
- Renamed to python-PyGithub (the previous name wasn't formed according
to Fedora naming guidelines).
- Updated to 1.14.2.

* Tue Mar 19 2013 Bohuslav Kabrda <bkabrda@redhat.com> - 1.11.1-3
- Specfile cleanup.
- Introduce python3 subpackage.

* Wed Feb 20 2013 Jiri Moskovcak <jmoskovc@redhat.com> - 1.11.1-2
- updated according to the review rhbz#910565 c#4

* Tue Feb 12 2013 Jiri Moskovcak <jmoskovc@redhat.com> - 1.11.1-1
- updated to the latest upstream

* Sun Feb 03 2013 Jiri Moskovcak <jmoskovc@redhat.com> - 1.10.0-1
- Initial package