From 2274deb28c5747ffc1cb6ddf69071dca638ff060 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Sun, 7 Apr 2019 13:14:24 +0200 Subject: [PATCH 1/5] Initial import Signed-off-by: Igor Gnatenko --- .gitignore | 1 + python-pygit2.spec | 107 +++++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 109 insertions(+) create mode 100644 python-pygit2.spec diff --git a/.gitignore b/.gitignore index e69de29..620aa5c 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/pygit2-0.28.0.tar.gz diff --git a/python-pygit2.spec b/python-pygit2.spec new file mode 100644 index 0000000..324efeb --- /dev/null +++ b/python-pygit2.spec @@ -0,0 +1,107 @@ +%global pkgname pygit2 + +Name: python-%{pkgname} +Version: 0.28.0 +Release: 1%{?dist} +Summary: Python bindings for libgit2 + +License: GPLv2 with linking exception +URL: https://www.pygit2.org/ +Source0: https://github.com/libgit2/%{pkgname}/archive/v%{version}/%{pkgname}-%{version}.tar.gz + +BuildRequires: gcc +BuildRequires: (libgit2-devel >= 0.28.0 with libgit2-devel < 0.29.0) + +%description +pygit2 is a set of Python bindings to the libgit2 library, which implements +the core of Git. + +%package -n python2-%{pkgname} +Summary: Python 2.x bindings for libgit2 +%{?python_provide:%python_provide python2-%{pkgname}} +BuildRequires: python2-devel +BuildRequires: python2-setuptools +BuildRequires: python2-cffi +BuildRequires: python2-six +BuildRequires: python2-pytest +Requires: python2-cffi +Requires: python2-six + +%description -n python2-%{pkgname} +pygit2 is a set of Python bindings to the libgit2 library, which implements +the core of Git. + +Python 2 version. + +%package -n python3-%{pkgname} +Summary: Python 3.x bindings for libgit2 +%{?python_provide:%python_provide python3-%{pkgname}} +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-cffi +BuildRequires: python3-six +BuildRequires: python3-pytest +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. + +%package doc +Summary: Documentation for %{name} +BuildArch: noarch +BuildRequires: /usr/bin/sphinx-build + +%description doc +Documentation for %{name}. + +%prep +%autosetup -n %{pkgname}-%{version} -p1 + +%build +%py2_build +%py3_build +make -C docs html + +%install +%py2_install +%py3_install +find %{_builddir} -name '.buildinfo' -delete + +# Correct the permissions. +find %{buildroot} -name '*.so' -exec chmod 755 {} ';' + +%check +# https://github.com/libgit2/pygit2/issues/812 +%ifarch ppc64 s390x + PYTHONPATH=%{buildroot}%{python2_sitearch} py.test-%{python2_version} -v || : + PYTHONPATH=%{buildroot}%{python3_sitearch} py.test-%{python3_version} -v || : +%else + PYTHONPATH=%{buildroot}%{python2_sitearch} py.test-%{python2_version} -v + PYTHONPATH=%{buildroot}%{python3_sitearch} py.test-%{python3_version} -v +%endif + +%files -n python2-%{pkgname} +%doc README.rst TODO.txt +%license COPYING +%{python2_sitearch}/%{pkgname}-*.egg-info/ +%{python2_sitearch}/%{pkgname}/ +%{python2_sitearch}/_%{pkgname}.so + +%files -n python3-%{pkgname} +%doc README.rst TODO.txt +%license COPYING +%{python3_sitearch}/%{pkgname}-*.egg-info/ +%{python3_sitearch}/%{pkgname}/ +%{python3_sitearch}/_%{pkgname}.*.so + +%files doc +%license COPYING +%doc docs/_build/html/* + +%changelog +* Apr 07 2019 13:12:51 CEST Igor Gnatenko - 0.28.0-1 +- Initial package diff --git a/sources b/sources index e69de29..07f08fb 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +SHA512 (pygit2-0.28.0.tar.gz) = 117d9f7da39d3d39d4d67941d08f2b404cbd05b80f504d0927b4f0532509adb81466b0b29c01cbcdb44e6681c00042f259132186d4b49745560639ce6cd82d7e From 775d8b67aeab49f175231eea16b9c0edad5205f6 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Sun, 7 Apr 2019 15:21:59 +0200 Subject: [PATCH 2/5] Fixup changelog Signed-off-by: Igor Gnatenko --- python-pygit2.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-pygit2.spec b/python-pygit2.spec index 324efeb..6a2aacc 100644 --- a/python-pygit2.spec +++ b/python-pygit2.spec @@ -103,5 +103,5 @@ find %{buildroot} -name '*.so' -exec chmod 755 {} ';' %doc docs/_build/html/* %changelog -* Apr 07 2019 13:12:51 CEST Igor Gnatenko - 0.28.0-1 +* Sun Apr 07 2019 13:12:51 CEST Igor Gnatenko - 0.28.0-1 - Initial package From 2897a4441f0dc596a4eb9a1ada5b1cbf660f9820 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Sun, 7 Apr 2019 19:45:39 +0200 Subject: [PATCH 3/5] Skip tests on aarch64/f28 Signed-off-by: Igor Gnatenko --- python-pygit2.spec | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/python-pygit2.spec b/python-pygit2.spec index 6a2aacc..8ec3f3d 100644 --- a/python-pygit2.spec +++ b/python-pygit2.spec @@ -1,3 +1,11 @@ +%if 0%{?fedora} && 0%{?fedora} <= 28 + # https://github.com/libgit2/pygit2/issues/811 + # https://github.com/libgit2/pygit2/issues/812 + %global arch_test_fail aarch64 ppc64 s390x +%else + # https://github.com/libgit2/pygit2/issues/811 + %global arch_test_fail ppc64 s390x +%endif %global pkgname pygit2 Name: python-%{pkgname} @@ -75,8 +83,7 @@ find %{_builddir} -name '.buildinfo' -delete find %{buildroot} -name '*.so' -exec chmod 755 {} ';' %check -# https://github.com/libgit2/pygit2/issues/812 -%ifarch ppc64 s390x +%ifarch arch_test_fail PYTHONPATH=%{buildroot}%{python2_sitearch} py.test-%{python2_version} -v || : PYTHONPATH=%{buildroot}%{python3_sitearch} py.test-%{python3_version} -v || : %else From 4f2efc3e9863c54a07b6a12eec66b233bb90de93 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Sun, 7 Apr 2019 20:12:53 +0200 Subject: [PATCH 4/5] Use proper macro Signed-off-by: Igor Gnatenko --- python-pygit2.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-pygit2.spec b/python-pygit2.spec index 8ec3f3d..8433f21 100644 --- a/python-pygit2.spec +++ b/python-pygit2.spec @@ -83,7 +83,7 @@ find %{_builddir} -name '.buildinfo' -delete find %{buildroot} -name '*.so' -exec chmod 755 {} ';' %check -%ifarch arch_test_fail +%ifarch %{arch_test_fail} PYTHONPATH=%{buildroot}%{python2_sitearch} py.test-%{python2_version} -v || : PYTHONPATH=%{buildroot}%{python3_sitearch} py.test-%{python3_version} -v || : %else From ee69ccd485814b8f24744af1823d9e70a494df5b Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Thu, 6 Jun 2019 14:35:30 +0200 Subject: [PATCH 5/5] Update to 0.28.2 Signed-off-by: Igor Gnatenko --- .gitignore | 1 + python-pygit2.spec | 12 ++++++------ sources | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 620aa5c..d7d2d34 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /pygit2-0.28.0.tar.gz +/pygit2-0.28.2.tar.gz diff --git a/python-pygit2.spec b/python-pygit2.spec index 8433f21..02e1a68 100644 --- a/python-pygit2.spec +++ b/python-pygit2.spec @@ -7,9 +7,10 @@ %global arch_test_fail ppc64 s390x %endif %global pkgname pygit2 +%{?python_enable_dependency_generator} Name: python-%{pkgname} -Version: 0.28.0 +Version: 0.28.2 Release: 1%{?dist} Summary: Python bindings for libgit2 @@ -32,8 +33,6 @@ BuildRequires: python2-setuptools BuildRequires: python2-cffi BuildRequires: python2-six BuildRequires: python2-pytest -Requires: python2-cffi -Requires: python2-six %description -n python2-%{pkgname} pygit2 is a set of Python bindings to the libgit2 library, which implements @@ -49,8 +48,6 @@ BuildRequires: python3-setuptools BuildRequires: python3-cffi BuildRequires: python3-six BuildRequires: python3-pytest -Requires: python3-cffi -Requires: python3-six %description -n python3-%{pkgname} pygit2 is a set of Python bindings to the libgit2 library, which implements @@ -110,5 +107,8 @@ find %{buildroot} -name '*.so' -exec chmod 755 {} ';' %doc docs/_build/html/* %changelog -* Sun Apr 07 2019 13:12:51 CEST Igor Gnatenko - 0.28.0-1 +* Thu Jun 06 14:32:34 CEST 2019 Igor Gnatenko - 0.28.2-1 +- Update to 0.28.2 + +* Sun Apr 07 13:12:51 CEST 2019 Igor Gnatenko - 0.28.0-1 - Initial package diff --git a/sources b/sources index 07f08fb..a3af7ec 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pygit2-0.28.0.tar.gz) = 117d9f7da39d3d39d4d67941d08f2b404cbd05b80f504d0927b4f0532509adb81466b0b29c01cbcdb44e6681c00042f259132186d4b49745560639ce6cd82d7e +SHA512 (pygit2-0.28.2.tar.gz) = ee8d271547704a341cb4917dfff5338550d2ddeb3c6ab4c9560665272fcaccba5427b01947d815b5329587c944803b78f3ee62df4709187b6a813d60cc51f5c6