[packages/python-pygit2] up to 0.28.2

atler atler at pld-linux.org
Thu Jul 25 21:25:32 CEST 2019


commit b06b30e622e60863b89ffbf82fba8822f855a3b7
Author: Jan Palus <atler at pld-linux.org>
Date:   Thu Jul 25 21:24:02 2019 +0200

    up to 0.28.2
    
    - dropped obsolete pycparser patch
    - attempt to adjust tests to pytest but still fail -- toggled bcond

 pycparser.patch    | 23 -----------------------
 python-pygit2.spec | 28 ++++++++++++++++++----------
 2 files changed, 18 insertions(+), 33 deletions(-)
---
diff --git a/python-pygit2.spec b/python-pygit2.spec
index b2a9bed..a256981 100644
--- a/python-pygit2.spec
+++ b/python-pygit2.spec
@@ -3,7 +3,7 @@
 %bcond_without	python2 # CPython 2.x module
 %bcond_without	python3 # CPython 3.x module
 %bcond_without	doc	# documentation
-%bcond_without	tests	# unit tests
+%bcond_with	tests	# unit tests
 
 %define		module		pygit2
 %define		egg_name	pygit2
@@ -11,15 +11,14 @@
 Summary:	Python 2.x bindings for libgit2 library
 Summary(pl.UTF-8):	Wiązania Pythona 2.x do biblioteki libgit2
 Name:		python-%{module}
-Version:	0.27.2
-Release:	2
+Version:	0.28.2
+Release:	1
 License:	GPL v2 with linking exception
 Group:		Libraries/Python
 #Source0Download: https://pypi.org/simple/pygit2/
 Source0:	https://files.pythonhosted.org/packages/source/p/pygit2/%{pypi_name}-%{version}.tar.gz
-# Source0-md5:	4db3fcd4c104f7e5a3cafb868e2bd0d4
+# Source0-md5:	e5fad67c46e2ebf3391cb9650684923d
 Patch0:		%{name}-docbuild.patch
-Patch1:		pycparser.patch
 URL:		https://pypi.org/project/pygit2/
 BuildRequires:	libgit2-devel >= 0.27.0
 BuildRequires:	rpm-pythonprov
@@ -28,12 +27,18 @@ BuildRequires:	rpmbuild(macros) >= 1.714
 BuildRequires:	python-cffi >= 1.8.1
 BuildRequires:	python-devel >= 1:2.7
 BuildRequires:	python-setuptools
+%if %{with tests}
+BuildRequires:	python-pytest
+%endif
 %endif
 %if %{with python3}
 BuildRequires:	python3-cffi >= 1.8.1
 BuildRequires:	python3-devel >= 1:3.2
 BuildRequires:	python3-modules >= 1:3.2
 BuildRequires:	python3-setuptools
+%if %{with tests}
+BuildRequires:	python3-pytest
+%endif
 %endif
 %{?with_doc:BuildRequires:     sphinx-pdg-3}
 Requires:	libgit2 >= 0.24.0
@@ -77,15 +82,18 @@ Dokumentacja API modułu pygit2.
 %prep
 %setup -q -n %{module}-%{version}
 %patch0 -p1
-%patch1 -p1
 
 %build
 %if %{with python2}
-%py_build %{?with_tests:test}
+%py_build
+
+%{?with_tests:PYTHONPATH=$(echo $(pwd)/build-2/lib.*) %{__python} -m pytest test}
 %endif
 
 %if %{with python3}
-%py3_build %{?with_tests:test}
+%py3_build
+
+%{?with_tests:PYTHONPATH=$(echo $(pwd)/build-3/lib.*) %{__python3} -m pytest test}
 %endif
 
 %if %{with doc}
@@ -116,7 +124,7 @@ rm -rf $RPM_BUILD_ROOT
 %doc COPYING README.rst TODO.txt
 %dir %{py_sitedir}/pygit2
 %{py_sitedir}/pygit2/*.py[co]
-%{py_sitedir}/pygit2/decl.h
+%{py_sitedir}/pygit2/decl
 %attr(755,root,root) %{py_sitedir}/pygit2/_libgit2.so
 %attr(755,root,root) %{py_sitedir}/_pygit2.so
 %{py_sitedir}/pygit2-%{version}-py*.egg-info
@@ -127,7 +135,7 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(644,root,root,755)
 %doc COPYING README.rst TODO.txt
 %dir %{py3_sitedir}/pygit2
-%{py3_sitedir}/pygit2/decl.h
+%{py3_sitedir}/pygit2/decl
 %{py3_sitedir}/pygit2/*.py
 %{py3_sitedir}/pygit2/__pycache__
 %attr(755,root,root) %{py3_sitedir}/pygit2/_libgit2.abi3.so
diff --git a/pycparser.patch b/pycparser.patch
deleted file mode 100644
index 6d10ef0..0000000
--- a/pycparser.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-From 1eaba181577de206d3d43ec7886d0353fc0c9f2a Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?J=2E=20David=20Ib=C3=A1=C3=B1ez?= <jdavid.ibp at gmail.com>
-Date: Mon, 17 Sep 2018 20:19:41 +0200
-Subject: [PATCH] Do not require older pycparser<2.18
-
-Fixes #819
----
- setup.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/setup.py b/setup.py
-index d1fc4e90..21d9276e 100644
---- a/setup.py
-+++ b/setup.py
-@@ -195,7 +195,7 @@ def run(self):
-       long_description=long_description,
-       packages=['pygit2'],
-       package_data={'pygit2': ['decl.h']},
--      setup_requires=['cffi', 'pycparser<2.18'],
-+      setup_requires=['cffi'],
-       install_requires=['cffi', 'six'],
-       zip_safe=False,
-       cmdclass=cmdclass,
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-pygit2.git/commitdiff/b06b30e622e60863b89ffbf82fba8822f855a3b7



More information about the pld-cvs-commit mailing list