271f11d
%if 0%{?fedora}
271f11d
%global with_python3 1
5864c3b
%endif
5864c3b
8c56dbe
%global pkgname pygit2
8c56dbe
8c56dbe
Name:           python-%{pkgname}
8ef1928
Version:        0.26.4
04e58c1
Release:        3%{?dist}
4e64165
Summary:        Python bindings for libgit2
c48577d
Igor Gnatenko 518e568
License:        GPLv2 with linking exception
8c56dbe
URL:            http://www.pygit2.org
f135c57
Source0:        https://github.com/libgit2/%{pkgname}/archive/v%{version}/%{pkgname}-%{version}.tar.gz
Igor Gnatenko 518e568
6fc2016
BuildRequires:  gcc
8c56dbe
BuildRequires:  libgit2-devel
fffb9f9
BuildRequires:  openssl-devel
8c56dbe
8c56dbe
%description
c48577d
pygit2 is a set of Python bindings to the libgit2 library, which implements
4e64165
the core of Git.
4e64165
271f11d
4e64165
%package -n python2-%{pkgname}
4e64165
Summary:        Python 2.x bindings for libgit2
4e64165
%{?python_provide:%python_provide python2-%{pkgname}}
4e64165
BuildRequires:  python2-cffi
4e64165
BuildRequires:  python2-devel
Igor Gnatenko c2ad1f0
BuildRequires:  python2-nose
c48577d
BuildRequires:  python2-setuptools
Igor Gnatenko c2ad1f0
BuildRequires:  python2-six
Igor Gnatenko c2ad1f0
Requires:       python2-cffi
Igor Gnatenko c2ad1f0
Requires:       python2-six
4e64165
4e64165
%description -n python2-%{pkgname}
c48577d
pygit2 is a set of Python bindings to the libgit2 library, which implements
4e64165
the core of Git.
234f238
4e64165
Python 2 version.
8c56dbe
271f11d
271f11d
%if 0%{?with_python3}
8c56dbe
%package -n     python3-%{pkgname}
8c56dbe
Summary:        Python 3.x bindings for libgit2
4e64165
%{?python_provide:%python_provide python3-%{pkgname}}
234f238
BuildRequires:  python3-cffi
8c56dbe
BuildRequires:  python3-devel
Igor Gnatenko c2ad1f0
BuildRequires:  python3-nose
c48577d
BuildRequires:  python3-setuptools
Igor Gnatenko c2ad1f0
BuildRequires:  python3-six
0846182
Requires:       python3-cffi
Igor Gnatenko c2ad1f0
Requires:       python3-six
0846182
8c56dbe
%description -n python3-%{pkgname}
c48577d
pygit2 is a set of Python bindings to the libgit2 library, which implements
4e64165
the core of Git.
234f238
4e64165
Python 3 version.
5864c3b
%endif
5864c3b
271f11d
8c56dbe
%package        doc
8c56dbe
Summary:        Documentation for %{name}
8c56dbe
BuildArch:      noarch
597053c
BuildRequires:  %{_bindir}/sphinx-build
8c56dbe
8c56dbe
%description    doc
8c56dbe
Documentation for %{name}.
8c56dbe
271f11d
8c56dbe
%prep
4e64165
%autosetup -n %{pkgname}-%{version} -p1
39bc7d0
bd862d5
# Remove failing create_from tests
bd862d5
# https://github.com/libgit2/pygit2/issues/748
bd862d5
rm test/test_patch.py
bd862d5
271f11d
8c56dbe
%build
4e64165
%py2_build
234f238
make -C docs html
271f11d
271f11d
%if 0%{?with_python3}
4e64165
%py3_build
5864c3b
%endif
5864c3b
271f11d
8c56dbe
%install
4e64165
%py2_install
271f11d
271f11d
%if 0%{?with_python3}
4e64165
%py3_install
5864c3b
%endif
c48577d
8c56dbe
find %{_builddir} -name '.buildinfo' -delete
c48577d
8c56dbe
# Correct the permissions.
8c56dbe
find %{buildroot} -name '*.so' -exec chmod 755 {} ';'
8c56dbe
271f11d
8c56dbe
%check
d37c4d2
%{__python2} setup.py test
271f11d
271f11d
%if 0%{?with_python3}
d37c4d2
%{__python3} setup.py test
5864c3b
%endif
5864c3b
271f11d
4e64165
%files -n python2-%{pkgname}
d7cd117
%doc README.rst TODO.txt
d7cd117
%license COPYING
a38c383
%{python2_sitearch}/%{pkgname}-%{version}-py%{python2_version}.egg-info
8c56dbe
%{python2_sitearch}/%{pkgname}
8c56dbe
%{python2_sitearch}/_%{pkgname}.so
8c56dbe
271f11d
%if 0%{?with_python3}
8c56dbe
%files -n python3-%{pkgname}
d7cd117
%doc README.rst TODO.txt
d7cd117
%license COPYING
a38c383
%{python3_sitearch}/%{pkgname}-%{version}-py%{python3_version}.egg-info
8c56dbe
%{python3_sitearch}/%{pkgname}
8c56dbe
%{python3_sitearch}/_%{pkgname}.*.so
5864c3b
%endif
8c56dbe
8c56dbe
%files doc
Igor Gnatenko 9365640
%license COPYING
8c56dbe
%doc docs/_build/html/*
8c56dbe
271f11d
8c56dbe
%changelog
04e58c1
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.26.4-3
04e58c1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
04e58c1
7e3690e
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 0.26.4-2
7e3690e
- Rebuilt for Python 3.7
7e3690e
8ef1928
* Mon Mar 26 2018 Pete Walter <pwalter@fedoraproject.org> - 0.26.4-1
8ef1928
- Update to 0.26.4
8ef1928
597053c
* Mon Feb 12 2018 Iryna Shcherbina <ishcherb@redhat.com> - 0.26.3-3
597053c
- Update Python 2 dependency declarations to new packaging standards
597053c
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
597053c
24f2553
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.26.3-2
24f2553
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
24f2553
8d8cb38
* Tue Dec 26 2017 Pete Walter <pwalter@fedoraproject.org> - 0.26.3-1
8d8cb38
- Update to 0.26.3
8d8cb38
4500c3b
* Fri Dec 01 2017 Pete Walter <pwalter@fedoraproject.org> - 0.26.2-1
4500c3b
- Update to 0.26.2
4500c3b
d1eab5b
* Mon Nov 20 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.26.1-3
d1eab5b
- Fixup python3 conditionals
d1eab5b
5a5c482
* Mon Nov 20 2017 Pete Walter <pwalter@fedoraproject.org> - 0.26.1-2
5a5c482
- Add back Python 3 conditionals
5a5c482
271f11d
* Mon Nov 20 2017 Pete Walter <pwalter@fedoraproject.org> - 0.26.1-1
f9616e2
- Update to 0.26.1
f9616e2
ce9cb4c
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.26.0-3
ce9cb4c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
ce9cb4c
382931b
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.26.0-2
382931b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
382931b
a481a7e
* Sat Jul 08 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.26.0-1
a481a7e
- Update to 0.26.0
a481a7e
b22a8ee
* Sun May 07 2017 Pete Walter <pwalter@fedoraproject.org> - 0.25.1-2
b22a8ee
- Fix the build with cffi 1.10
b22a8ee
962c252
* Thu Apr 27 2017 Pete Walter <pwalter@fedoraproject.org> - 0.25.1-1
962c252
- Update to 0.25.1
724078a
- Disable one more failing test that tries to do network access
962c252
c48577d
* Mon Apr 10 2017 Pete Walter <pwalter@fedoraproject.org> - 0.25.0-3
c48577d
- Trivial spec file fixes
1ec0be8
- Add Python 3 conditionals
c48577d
Igor Gnatenko 3218229
* Tue Feb 07 2017 Igor Gnatenko <ignatenko@redhat.com> - 0.25.0-2
Igor Gnatenko 3218229
- Bump release for rebuild
Igor Gnatenko 3218229
Igor Gnatenko 9365640
* Tue Jan 10 2017 Igor Gnatenko <ignatenko@redhat.com> - 0.25.0-1
Igor Gnatenko 9365640
- Update to 0.25.0 (RHBZ #1408689)
Igor Gnatenko 9365640
0ad30d9
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 0.24.2-2
0ad30d9
- Rebuild for Python 3.6
0ad30d9
a9e2716
* Sat Nov 19 2016 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 0.24.2-1
a9e2716
- Update to 0.24.2 (RHBZ #1390796)
a9e2716
49897c2
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.24.1-2
49897c2
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
49897c2
f135c57
* Wed Jun 22 2016 Igor Gnatenko <ignatenko@redhat.com> - 0.24.1-1
f135c57
- Update to 0.24.1 (RHBZ #1348750)
f135c57
Igor Gnatenko 518e568
* Mon Apr 18 2016 Igor Gnatenko <ignatenko@redhat.com> 0.24.0-3
Igor Gnatenko 518e568
- Remove remote-calling unit tests
Igor Gnatenko 518e568
- repository: decode() linkname
Igor Gnatenko 518e568
- repository: SYMTYPE is constant in module tarfile, not in any class
Igor Gnatenko 518e568
Igor Gnatenko c2ad1f0
* Thu Apr 14 2016 Igor Gnatenko <ignatenko@redhat.com> - 0.24.0-2
Igor Gnatenko c2ad1f0
- Add python[23]-six to BR/Rs
Igor Gnatenko c2ad1f0
37be196
* Sun Mar 20 2016 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 0.24.0-1
37be196
- Update to 0.24.0
37be196
f9aa4bf
* Wed Feb 24 2016 Pierre-Yves Chibon <pingou@pingoured.fr> - 0.23.3-2
f9aa4bf
- Fix building 0.23.3 also in i686
f9aa4bf
4e64165
* Sun Feb 14 2016 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 0.23.3-1
4e64165
- Update to 0.23.3
4e64165
- Fix compliance with new packaging guidelines
4e64165
8c404af
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.23.1-3
8c404af
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
8c404af
f116561
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.23.1-2
f116561
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
f116561
a38c383
* Sun Sep 27 2015 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 0.23.1-1
a38c383
- Update to 0.23.1 (RHBZ #1266726)
a38c383
682256b
* Fri Jul 31 2015 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.23.0-0.1
682256b
- Cherry-pick patch for 0.23.0 support
682256b
909a086
* Fri Jul 31 2015 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.22.1-2
909a086
- Rebuilt for libgit2-0.23.0 and libgit2-glib-0.23
909a086
Fedora Release Monitoring e00f540
* Mon Jul 13 2015 Mathieu Bridon <bochecha@daitauha.fr> - 0.22.1-1
Fedora Release Monitoring e00f540
- Update to 0.22.1 (#1242226)
Fedora Release Monitoring e00f540
- Drop one of our patches, as it has been merged in this release.
Fedora Release Monitoring e00f540
43d6fcd
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.22.0-2
43d6fcd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
43d6fcd
bb63a54
* Wed Jan 21 2015 Mathieu Bridon <bochecha@daitauha.fr> - 0.22.0-1
bb63a54
- Update to 0.22.0
bb63a54
39bc7d0
* Mon Nov 17 2014 Mathieu Bridon <bochecha@fedoraproject.org> - 0.21.4-1
39bc7d0
- Update to 0.21.4
39bc7d0
57fe51d
* Fri Sep 19 2014 Mathieu Bridon <bochecha@fedoraproject.org> - 0.21.3-1
57fe51d
- Update to 0.21.3
57fe51d
a52a991
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.21.2-3
a52a991
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
a52a991
771a4ea
* Thu Aug 14 2014 Mathieu Bridon <bochecha@fedoraproject.org> - 0.21.2-2
0846182
- Add missing requirement
0846182
  https://bugzilla.redhat.com/show_bug.cgi?id=1129868
0846182
e148289
* Tue Aug 12 2014 Mathieu Bridon <bochecha@fedoraproject.org> - 0.21.2-1
e148289
- Update to 0.21.2
e148289
d7cd117
* Tue Jul 29 2014 Mathieu Bridon <bochecha@fedoraproject.org> - 0.21.1-1
d7cd117
- Update to 0.21.1
d7cd117
234f238
* Sun Jun 29 2014 Mathieu Bridon <bochecha@fedoraproject.org> - 0.21.0-1
234f238
- Update to 0.21.0
234f238
fffb9f9
* Sat Jun 21 2014 Christopher Meng <rpm@cicku.me> - 0.20.3-1
fffb9f9
- Update to 0.20.3
fffb9f9
1d4db34
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.20.2-3
1d4db34
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
1d4db34
e96357b
* Wed May 28 2014 Kalev Lember <kalevlember@gmail.com> - 0.20.2-2
e96357b
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
e96357b
8c56dbe
* Sun Mar 09 2014 Christopher Meng <rpm@cicku.me> - 0.20.2-1
8c56dbe
- Update to 0.20.2
8c56dbe
8c56dbe
* Sun Dec 08 2013 Christopher Meng <rpm@cicku.me> - 0.20.0-1
8c56dbe
- Update to 0.20.0
8c56dbe
- Clarify the license
8c56dbe
8c56dbe
* Tue Oct 08 2013 Christopher Meng <rpm@cicku.me> - 0.19.1-2
8c56dbe
- Split out -doc subpackage.
8c56dbe
- Correct the libs permissions.
8c56dbe
8c56dbe
* Mon Oct 07 2013 Christopher Meng <rpm@cicku.me> - 0.19.1-1
8c56dbe
- Update to 0.19.1
8c56dbe
8c56dbe
* Sat Aug 17 2013 Christopher Meng <rpm@cicku.me> - 0.19.0-4
8c56dbe
- Add missing sphinx BR.
8c56dbe
8c56dbe
* Tue Aug 13 2013 Christopher Meng <rpm@cicku.me> - 0.19.0-3
8c56dbe
- Remove unneeded files.
8c56dbe
8c56dbe
* Mon Aug 12 2013 Christopher Meng <rpm@cicku.me> - 0.19.0-2
8c56dbe
- Add missing nose BR.
8c56dbe
- Add docs.
8c56dbe
8c56dbe
* Thu Aug 01 2013 Christopher Meng <rpm@cicku.me> - 0.19.0-1
8c56dbe
- Update to new release.
8c56dbe
8c56dbe
* Fri Apr 26 2013 Christopher Meng <rpm@cicku.me> - 0.18.1-1
8c56dbe
- Update to new release.
8c56dbe
8c56dbe
* Mon Sep 24 2012 Christopher Meng <rpm@cicku.me> - 0.17.3-1
8c56dbe
- Update to new release.
8c56dbe
8c56dbe
* Sun Jul 29 2012 Christopher Meng <rpm@cicku.me> - 0.17.2-1
8c56dbe
- Update to new release.
8c56dbe
8c56dbe
* Fri Mar 30 2012 Christopher Meng <rpm@cicku.me> - 0.16.1-1
8c56dbe
- Update to new release.
8c56dbe
8c56dbe
* Thu Mar 01 2012 Christopher Meng <rpm@cicku.me> - 0.16.0-1
8c56dbe
- Initial Package.