8c56dbe
%global pkgname pygit2
8c56dbe
8c56dbe
Name:           python-%{pkgname}
a38c383
Version:        0.23.1
a38c383
Release:        1%{?dist}
8c56dbe
Summary:        Python 2.x bindings for libgit2
8c56dbe
URL:            http://www.pygit2.org
a38c383
Source:         http://pypi.python.org/packages/source/p/%{pkgname}/%{pkgname}-%{version}.tar.gz
8c56dbe
License:        GPLv2 with linking exception
8c56dbe
BuildRequires:  libgit2-devel
fffb9f9
BuildRequires:  openssl-devel
234f238
BuildRequires:  python-cffi
8c56dbe
BuildRequires:  python2-devel
8c56dbe
BuildRequires:  python-nose
8c56dbe
BuildRequires:  python-setuptools
8c56dbe
0846182
Requires:       python-cffi
0846182
bb63a54
Patch1:         0001-Remove-remote-calling-unit-tests.patch
bb63a54
8c56dbe
%description
8c56dbe
pygit2 is a set of Python bindings to the libgit2 library, which implements 
bb63a54
the core of Git. Pygit2 works with Python 2.7, 3.1, 3.2, 3.3, 3.4 and pypy.
234f238
8c56dbe
8c56dbe
%package -n     python3-%{pkgname}
8c56dbe
Summary:        Python 3.x bindings for libgit2
234f238
BuildRequires:  python3-cffi
8c56dbe
BuildRequires:  python3-devel
8c56dbe
BuildRequires:  python3-nose
8c56dbe
BuildRequires:  python3-setuptools
8c56dbe
0846182
Requires:       python3-cffi
0846182
8c56dbe
%description -n python3-%{pkgname}
8c56dbe
pygit2 is a set of Python bindings to the libgit2 library, which implements 
234f238
the core of Git. Pygit2 works with Python 2.7, 3.1, 3.2, 3.3 and 3.4.
234f238
8c56dbe
8c56dbe
%package        doc
8c56dbe
Summary:        Documentation for %{name}
8c56dbe
BuildArch:      noarch
234f238
BuildRequires:  python-sphinx
234f238
Requires:       %{name} = %{version}-%{release}
8c56dbe
8c56dbe
%description    doc
8c56dbe
Documentation for %{name}.
8c56dbe
234f238
8c56dbe
%prep
a38c383
%setup -qn %{pkgname}-%{version}
bb63a54
%patch1 -p1
a8a0b3f
8c56dbe
rm -rf %{py3dir}
8c56dbe
cp -a . %{py3dir}
8c56dbe
39bc7d0
8c56dbe
%build
8c56dbe
CFLAGS="%{optflags}" %{__python2} setup.py build
234f238
make -C docs html
234f238
8c56dbe
pushd %{py3dir}
8c56dbe
CFLAGS="%{optflags}" %{__python3} setup.py build
8c56dbe
popd
234f238
8c56dbe
8c56dbe
%install
8c56dbe
%{__python2} setup.py install --prefix=%{_prefix} -O1 --skip-build --root=%{buildroot}
8c56dbe
pushd %{py3dir}
8c56dbe
%{__python3} setup.py install --prefix=%{_prefix} -O1 --skip-build --root=%{buildroot}
8c56dbe
popd
8c56dbe
find %{_builddir} -name '.buildinfo' -delete
8c56dbe
# Correct the permissions.
8c56dbe
find %{buildroot} -name '*.so' -exec chmod 755 {} ';'
8c56dbe
39bc7d0
8c56dbe
%check
8c56dbe
%{__python2} setup.py test
8c56dbe
pushd %{py3dir}
8c56dbe
%{__python3} setup.py test
8c56dbe
popd
8c56dbe
39bc7d0
8c56dbe
%files
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
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
8c56dbe
8c56dbe
%files doc
8c56dbe
%doc docs/_build/html/*
8c56dbe
d7cd117
8c56dbe
%changelog
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.