3cb8a04
%global pypi_name PyGithub
3cb8a04
%global with_python3 1
3cb8a04
3cb8a04
Name:           python-%{pypi_name}
e8194b1
Version:        1.25.0
e8194b1
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}
3cb8a04
%package -n     python3-github
3cb8a04
Summary:        Python library to work with the Github API
3cb8a04
Group:          Development/Languages
3cb8a04
3cb8a04
Obsoletes:      python3-github < 1.11.1-4
3cb8a04
Provides:       python3-github
3cb8a04
3cb8a04
%description -n python3-github
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
3cb8a04
%{__python} setup.py build
3cb8a04
# don't keep these files in the library itself in RPM package
3cb8a04
mv build/lib/github/COPYING .
3cb8a04
mv build/lib/github/COPYING.LESSER .
3cb8a04
3cb8a04
%if 0%{?with_python3}
3cb8a04
pushd %{py3dir}
3cb8a04
%{__python3} setup.py build
3cb8a04
mv build/lib/github/COPYING .
3cb8a04
mv build/lib/github/COPYING.LESSER .
3cb8a04
popd
3cb8a04
%endif # with_python3
3cb8a04
3cb8a04
%install
3cb8a04
%if 0%{?with_python3}
3cb8a04
pushd %{py3dir}
3cb8a04
%{__python3} setup.py install --skip-build --root %{buildroot}
3cb8a04
popd
3cb8a04
%endif # with_python3
3cb8a04
3cb8a04
%{__python} setup.py install --skip-build --root %{buildroot}
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
3cb8a04
%doc COPYING COPYING.LESSER README.rst
3cb8a04
%{python_sitelib}/*
3cb8a04
%exclude %{python_sitelib}/github/tests
3cb8a04
3cb8a04
%if 0%{?with_python3}
3cb8a04
%files -n python3-github
3cb8a04
%doc COPYING COPYING.LESSER README.rst
3cb8a04
%{python3_sitelib}/*
3cb8a04
%exclude %{python3_sitelib}/github/tests
3cb8a04
%endif
3cb8a04
3cb8a04
%changelog
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