%if 0%{?fedora} %global with_python3 1 %endif %global pkgname pygit2 Name: python-%{pkgname} Version: 0.24.2 Release: 1%{?dist} Summary: Python 2.x bindings for libgit2 License: GPLv2 with linking exception URL: http://www.pygit2.org Source0: https://github.com/libgit2/%{pkgname}/archive/v%{version}/%{pkgname}-%{version}.tar.gz Patch0001: 0001-Remove-remote-calling-unit-tests.patch BuildRequires: libgit2-devel BuildRequires: openssl-devel BuildRequires: python-cffi BuildRequires: python2-devel BuildRequires: python-nose BuildRequires: python-setuptools BuildRequires: python-six Requires: python-cffi >= 1.6.0-5.el7 Requires: python-six %description pygit2 is a set of Python bindings to the libgit2 library, which implements the core of Git. %if 0%{?with_python3} %package -n python3-%{pkgname} Summary: Python 3.x bindings for libgit2 %{?python_provide:%python_provide python3-%{pkgname}} BuildRequires: python3-cffi BuildRequires: python3-devel BuildRequires: python3-nose BuildRequires: python3-setuptools BuildRequires: python3-six Requires: python3-cffi Requires: python3-six %description -n python3-%{pkgname} pygit2 is a set of Python bindings to the libgit2 library, which implements the core of Git. Python 3 version. %endif %package doc Summary: Documentation for %{name} BuildArch: noarch BuildRequires: python-sphinx %description doc Documentation for %{name}. %prep %autosetup -n %{pkgname}-%{version} -p1 %build %py2_build make -C docs html %if 0%{?with_python3} %py3_build %endif %install %py2_install %if 0%{?with_python3} %py3_install %endif find %{_builddir} -name '.buildinfo' -delete # Correct the permissions. find %{buildroot} -name '*.so' -exec chmod 755 {} ';' %check %{__python2} setup.py test %if 0%{?with_python3} %{__python3} setup.py test %endif %files %doc README.rst TODO.txt %license COPYING %{python2_sitearch}/%{pkgname}-%{version}-py%{python2_version}.egg-info %{python2_sitearch}/%{pkgname} %{python2_sitearch}/_%{pkgname}.so %if 0%{?with_python3} %files -n python3-%{pkgname} %doc README.rst TODO.txt %license COPYING %{python3_sitearch}/%{pkgname}-%{version}-py%{python3_version}.egg-info %{python3_sitearch}/%{pkgname} %{python3_sitearch}/_%{pkgname}.*.so %endif %files doc %license COPYING %doc docs/_build/html/* %changelog * Thu Apr 13 2017 Pete Walter - 0.24.2-1 - Update to 0.24.2 * Fri Feb 10 2017 Kevin Fenzi - 0.21.4-3 - Rebuild for python-cffi update in rhel. Fixes bug #1400668 * Wed Jan 14 2015 Ralph Bean - 0.21.4-2 - Conditionalize python3 subpackage. * Mon Nov 17 2014 Mathieu Bridon - 0.21.4-1 - Update to 0.21.4 * Fri Sep 19 2014 Mathieu Bridon - 0.21.3-1 - Update to 0.21.3 * Sun Aug 17 2014 Fedora Release Engineering - 0.21.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild * Thu Aug 14 2014 Mathieu Bridon - 0.21.2-2 - Add missing requirement https://bugzilla.redhat.com/show_bug.cgi?id=1129868 * Tue Aug 12 2014 Mathieu Bridon - 0.21.2-1 - Update to 0.21.2 * Tue Jul 29 2014 Mathieu Bridon - 0.21.1-1 - Update to 0.21.1 * Sun Jun 29 2014 Mathieu Bridon - 0.21.0-1 - Update to 0.21.0 * Sat Jun 21 2014 Christopher Meng - 0.20.3-1 - Update to 0.20.3 * Sat Jun 07 2014 Fedora Release Engineering - 0.20.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Wed May 28 2014 Kalev Lember - 0.20.2-2 - Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4 * Sun Mar 09 2014 Christopher Meng - 0.20.2-1 - Update to 0.20.2 * Sun Dec 08 2013 Christopher Meng - 0.20.0-1 - Update to 0.20.0 - Clarify the license * Tue Oct 08 2013 Christopher Meng - 0.19.1-2 - Split out -doc subpackage. - Correct the libs permissions. * Mon Oct 07 2013 Christopher Meng - 0.19.1-1 - Update to 0.19.1 * Sat Aug 17 2013 Christopher Meng - 0.19.0-4 - Add missing sphinx BR. * Tue Aug 13 2013 Christopher Meng - 0.19.0-3 - Remove unneeded files. * Mon Aug 12 2013 Christopher Meng - 0.19.0-2 - Add missing nose BR. - Add docs. * Thu Aug 01 2013 Christopher Meng - 0.19.0-1 - Update to new release. * Fri Apr 26 2013 Christopher Meng - 0.18.1-1 - Update to new release. * Mon Sep 24 2012 Christopher Meng - 0.17.3-1 - Update to new release. * Sun Jul 29 2012 Christopher Meng - 0.17.2-1 - Update to new release. * Fri Mar 30 2012 Christopher Meng - 0.16.1-1 - Update to new release. * Thu Mar 01 2012 Christopher Meng - 0.16.0-1 - Initial Package.