[packages/python-cffi] - updated to 1.11.5 - split -apidocs - run tests (except for one set, more or less randomly failing)

qboosh qboosh at pld-linux.org
Sun May 27 20:35:18 CEST 2018


commit 5cd26f142300ebd1f568bd7b6773e7ec30cdaab8
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sun May 27 20:36:16 2018 +0200

    - updated to 1.11.5
    - split -apidocs
    - run tests (except for one set, more or less randomly failing)

 python-cffi.spec | 71 +++++++++++++++++++++++++++++++++++++++++++++-----------
 1 file changed, 58 insertions(+), 13 deletions(-)
---
diff --git a/python-cffi.spec b/python-cffi.spec
index 0422a44..592de31 100644
--- a/python-cffi.spec
+++ b/python-cffi.spec
@@ -1,34 +1,45 @@
+# TODO: examine test_thread.py failures and remove --ignore from py.test invocations
 #
 # Conditional build:
-%bcond_without  python2 # CPython 2.x module
-%bcond_without  python3 # CPython 3.x module
-%bcond_without	doc	# sphinx based documentation
+%bcond_without	python2 # CPython 2.x module
+%bcond_without	python3 # CPython 3.x module
+%bcond_without	doc	# Sphinx based documentation
+%bcond_without	tests	# unit tests
 #
 Summary:	Foreign Function Interface for Python 2 calling C code
 Summary(pl.UTF-8):	Interfejs funkcji obcych (FFI) dla Pythona 2 wywołującego kod w C
 Name:		python-cffi
-Version:	1.9.1
-Release:	2
+Version:	1.11.5
+Release:	1
 License:	MIT
 Group:		Libraries/Python
-#Source0Download: https://pypi.python.org/pypi/cffi
-Source0:	https://pypi.python.org/packages/a1/32/e3d6c3a8b5461b903651dd6ce958ed03c093d2e00128e3f33ea69f1d7965/cffi-%{version}.tar.gz
-# Source0-md5:	b8fa7ccb87790531db3316ab17aa8244
+#Source0Download: https://pypi.org/simple/cffi/
+Source0:	https://files.pythonhosted.org/packages/source/c/cffi/cffi-%{version}.tar.gz
+# Source0-md5:	ac8492f4ad952360737413e82d661908
+Patch0:		%{name}-tests.patch
 URL:		http://cffi.readthedocs.org/
 BuildRequires:	libffi-devel >= 3
 BuildRequires:	pkgconfig
 %if %{with python2}
 BuildRequires:	python >= 1:2.6
 BuildRequires:	python-devel >= 1:2.6
+%if %{with tests}
+BuildRequires:	python-pycparser
+BuildRequires:	python-pytest
+%endif
 %endif
 %if %{with python3}
 BuildRequires:	python3 >= 1:3.2
 BuildRequires:	python3-devel >= 1:3.2
+%if %{with tests}
+BuildRequires:	python3-pycparser
+BuildRequires:	python3-pytest
+%endif
 %endif
 BuildRequires:	rpm-pythonprov
-BuildRequires:	rpmbuild(macros) >= 1.710
+BuildRequires:	rpmbuild(macros) >= 1.714
 %{?with_doc:BuildRequires:	sphinx-pdg}
-Requires:	python-modules
+Requires:	python-modules >= 1:2.6
 Requires:	python-pycparser
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -51,7 +62,7 @@ Ten pakiet zawiera moduł Pythona 2.
 Summary:	Foreign Function Interface for Python 3 calling C code
 Summary(pl.UTF-8):	Interfejs funkcji obcych (FFI) dla Pythona 3 wywołującego kod w C
 Group:		Libraries/Python
-Requires:	python3-modules
+Requires:	python3-modules >= 1:3.2
 Requires:	python3-pycparser
 
 %description -n python3-cffi
@@ -69,15 +80,41 @@ potrzeby nauki dodatkowego języka lub API.
 
 Ten pakiet zawiera moduł Pythona 3.
 
+%package apidocs
+Summary:	API documentation for Python CFFI module
+Summary(pl.UTF-8):	Dokumentacja API modułu Pythona CFFI
+Group:		Documentation
+%if "%{_rpmversion}" >= "5"
+BuildArch:	noarch
+%endif
+
+%description apidocs
+API documentation for Python CFFI module.
+
+%description apidocs -l pl.UTF-8
+Dokumentacja API modułu Pythona CFFI.
+
 %prep
 %setup -q -n cffi-%{version}
+%patch0 -p1
 
 %build
 %if %{with python2}
 %py_build
+
+%if %{with tests}
+PYTHONPATH=$(echo build-2/lib.linux-*) \
+py.test-2 --ignore=testing/embedding/test_thread.py c testing
+%endif
 %endif
+
 %if %{with python3}
 %py3_build
+
+%if %{with tests}
+PYTHONPATH=$(echo build-3/lib.linux-*) \
+py.test-3 --ignore=testing/embedding/test_thread.py c testing
+%endif
 %endif
 
 %if %{with doc}
@@ -103,9 +140,10 @@ rm -rf $RPM_BUILD_ROOT
 %if %{with python2}
 %files
 %defattr(644,root,root,755)
-%doc AUTHORS LICENSE %{?with_doc:doc/build/html/{*.html,*.js,_static}}
+%doc AUTHORS LICENSE README.md
 %attr(755,root,root) %{py_sitedir}/_cffi_backend.so
 %dir %{py_sitedir}/cffi
+%{py_sitedir}/cffi/_cffi_errors.h
 %{py_sitedir}/cffi/_cffi_include.h
 %{py_sitedir}/cffi/_embedding.h
 %{py_sitedir}/cffi/parse_c_type.h
@@ -116,9 +154,10 @@ rm -rf $RPM_BUILD_ROOT
 %if %{with python3}
 %files -n python3-cffi
 %defattr(644,root,root,755)
-%doc AUTHORS LICENSE %{?with_doc:doc/build/html/{*.html,*.js,_static}}
+%doc AUTHORS LICENSE README.md
 %attr(755,root,root) %{py3_sitedir}/_cffi_backend.cpython-*.so
 %dir %{py3_sitedir}/cffi
+%{py3_sitedir}/cffi/_cffi_errors.h
 %{py3_sitedir}/cffi/_cffi_include.h
 %{py3_sitedir}/cffi/_embedding.h
 %{py3_sitedir}/cffi/parse_c_type.h
@@ -126,3 +165,9 @@ rm -rf $RPM_BUILD_ROOT
 %{py3_sitedir}/cffi/__pycache__
 %{py3_sitedir}/cffi-%{version}-py*.egg-info
 %endif
+
+%if %{with doc}
+%files apidocs
+%defattr(644,root,root,755)
+%doc doc/build/html/{_static,*.html,*.js}
+%endif
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-cffi.git/commitdiff/5cd26f142300ebd1f568bd7b6773e7ec30cdaab8



More information about the pld-cvs-commit mailing list