[packages/python-pygit2] - updated to 0.24.0 - added python2 bcond

qboosh qboosh at pld-linux.org
Mon Mar 21 19:36:50 CET 2016


commit e209e12cd1968619df32d93262ba4b9e7b77dce8
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Mon Mar 21 19:41:00 2016 +0100

    - updated to 0.24.0
    - added python2 bcond

 python-pygit2.spec | 36 +++++++++++++++++++++++-------------
 1 file changed, 23 insertions(+), 13 deletions(-)
---
diff --git a/python-pygit2.spec b/python-pygit2.spec
index f9bc34a..8516bcd 100644
--- a/python-pygit2.spec
+++ b/python-pygit2.spec
@@ -3,6 +3,7 @@
 #
 # Conditional build:
 %bcond_without	tests	# do not perform "make test"
+%bcond_without	python2 # CPython 2.x module
 %bcond_without	python3 # CPython 3.x module
 %bcond_without	doc	# documentation
 
@@ -10,21 +11,23 @@
 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.23.3
+Version:	0.24.0
 Release:	1
 License:	GPL v2 with linking exception
 Group:		Libraries/Python
-#Source0Download: https://pypi.python.org/pypi/pygit2
+#Source0Download: https://pypi.python.org/simple/pygit2/
 Source0:	https://pypi.python.org/packages/source/p/pygit2/%{module}-%{version}.tar.gz
-# Source0-md5:	1c20926ad48ce622b0087ab2bb812ae3
+# Source0-md5:	05f62d21f054c1a1559a726c7fdaeff1
 Patch0:		%{name}-docbuild.patch
 URL:		https://pypi.python.org/pypi/pygit2
-BuildRequires:	libgit2-devel >= 0.23.0
+BuildRequires:	libgit2-devel >= 0.24.0
+BuildRequires:	rpm-pythonprov
+BuildRequires:	rpmbuild(macros) >= 1.714
+%if %{with python2}
 BuildRequires:	python-cffi
 BuildRequires:	python-devel >= 1:2.7
 BuildRequires:	python-setuptools
-BuildRequires:	rpm-pythonprov
-BuildRequires:	rpmbuild(macros) >= 1.714
+%endif
 %if %{with python3}
 BuildRequires:	python3-cffi
 BuildRequires:	python3-devel >= 1:3.2
@@ -32,7 +35,7 @@ BuildRequires:	python3-modules >= 1:3.2
 BuildRequires:	python3-setuptools
 %endif
 %{?with_doc:BuildRequires:     sphinx-pdg}
-Requires:	libgit2 >= 0.23.0
+Requires:	libgit2 >= 0.24.0
 Requires:	python-cffi
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -46,7 +49,7 @@ pygit2 to zbiór wiązań Pythona do biblioteki współdzielonej libgit2.
 Summary:	Python 3.x bindings for libgit2 library
 Summary(pl.UTF-8):	Wiązania Pythona 3.x do biblioteki libgit2
 Group:		Libraries/Python
-Requires:	libgit2 >= 0.23.0
+Requires:	libgit2 >= 0.24.0
 Requires:	python3-cffi
 
 %description -n python3-%{module}
@@ -56,15 +59,15 @@ pygit2 is a set of Python bindings to the libgit2 shared library.
 pygit2 to zbiór wiązań Pythona do biblioteki współdzielonej libgit2.
 
 %package apidoc
-Summary:	pygit2 API documentation
-Summary(pl.UTF-8):	Dokumentacja API pygit2
+Summary:	pygit2 module API documentation
+Summary(pl.UTF-8):	Dokumentacja API modułu pygit2
 Group:		Documentation
 
 %description apidoc
-API documentation for %{module}.
+API documentation for pygit2 module.
 
 %description apidoc -l pl.UTF-8
-Dokumentacja API %{module}.
+Dokumentacja API modułu pygit2.
 
 %prep
 %setup -q -n %{module}-%{version}
@@ -74,8 +77,10 @@ Dokumentacja API %{module}.
 %{__rm} test/test_{credentials,repository}.py
 
 %build
+%if %{with python2}
 %py_build
 %{?with_tests:%py_build test}
+%endif
 
 %if %{with python3}
 %py3_build
@@ -86,13 +91,16 @@ Dokumentacja API %{module}.
 cd docs
 PACKAGE_BUILD=../build-2 \
 %{__make} -j1 html
-rm -rf _build/html/_sources
+%{__rm} -r _build/html/_sources
 %endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
+
+%if%{with python2}
 %py_install
 %py_postclean
+%endif
 
 %if %{with python3}
 %py3_install
@@ -101,6 +109,7 @@ rm -rf $RPM_BUILD_ROOT
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%if %{with python2}
 %files
 %defattr(644,root,root,755)
 %doc COPYING README.rst TODO.txt
@@ -110,6 +119,7 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{py_sitedir}/pygit2/_libgit2.so
 %attr(755,root,root) %{py_sitedir}/_pygit2.so
 %{py_sitedir}/pygit2-%{version}-py*.egg-info
+%endif
 
 %if %{with python3}
 %files -n python3-%{module}
================================================================

---- gitweb:

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



More information about the pld-cvs-commit mailing list