[packages/python-zope.testing] - updated to 4.10, added apidocs

qboosh qboosh at pld-linux.org
Tue Apr 26 21:34:45 CEST 2022


commit 1378b97849bb353b2fcc1d74b87e78f15940ae70
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Tue Apr 26 21:35:04 2022 +0200

    - updated to 4.10, added apidocs

 python-zope.testing.spec | 47 ++++++++++++++++++++++++++++++++++++++++-------
 1 file changed, 40 insertions(+), 7 deletions(-)
---
diff --git a/python-zope.testing.spec b/python-zope.testing.spec
index 13c6998..8dd5b15 100644
--- a/python-zope.testing.spec
+++ b/python-zope.testing.spec
@@ -1,5 +1,6 @@
 #
 # Conditional build:
+%bcond_without	doc	# Sphinx documentation
 %bcond_without	tests	# unit tests
 %bcond_without	python2 # CPython 2.x module
 %bcond_without	python3 # CPython 3.x module
@@ -8,25 +9,38 @@
 Summary:	Support for different testing frameworks
 Summary(pl.UTF-8):	Obsługa różnych szkieletów testowych
 Name:		python-%{module}
-Version:	4.9
-Release:	5
+Version:	4.10
+Release:	1
 License:	ZPL v2.1
 Group:		Libraries/Python
 #Source0Download: https://pypi.org/simple/zope-testing/
 Source0:	https://files.pythonhosted.org/packages/source/z/zope.testing/zope.testing-%{version}.tar.gz
-# Source0-md5:	35d3b8a163874bfc18a084534b52e186
+# Source0-md5:	c12a0d350acc6d267f6c53a440e00049
 URL:		https://www.zope.org/
 %if %{with python2}
 BuildRequires:	python >= 1:2.7
 BuildRequires:	python-devel >= 1:2.7
+BuildRequires:	python-setuptools
+%if %{with tests}
+BuildRequires:	python-zope.testrunner
+%endif
 %endif
 %if %{with python3}
 BuildRequires:	python3-devel >= 1:3.5
 BuildRequires:	python3-modules >= 1:3.5
 BuildRequires:	python3-setuptools
+%if %{with tests}
+BuildRequires:	python3-zope.testrunner
+%endif
 %endif
 BuildRequires:	rpm-pythonprov
 BuildRequires:	rpmbuild(macros) >= 1.714
+%if %{with doc}
+BuildRequires:	python3-repoze.sphinx.autointerface
+BuildRequires:	python3-zope.exceptions
+BuildRequires:	python3-zope.interface
+BuildRequires:	sphinx-pdg-3
+%endif
 Requires:	python-modules >= 1:2.7
 Requires:	python-zope-base
 Obsoletes:	Zope-Testing < 4
@@ -56,6 +70,17 @@ doctest and unittest.
 Ten pakiet udostępnia wiele szkieletów testowych. Obsługuje zarówno
 doctest jak i unittest.
 
+%package apidocs
+Summary:	API documentation for Python zope.testing module
+Summary(pl.UTF-8):	Dokumentacja API modułu Pythona zope.testing
+Group:		Documentation
+
+%description apidocs
+API documentation for Python zope.testing module.
+
+%description apidocs -l pl.UTF-8
+Dokumentacja API modułu Pythona zope.testing.
+
 %prep
 %setup -q -n %{module}-%{version}
 
@@ -68,12 +93,15 @@ doctest jak i unittest.
 %py3_build %{?with_tests:test}
 %endif
 
+%if %{with doc}
+sphinx-build-3 -b html docs docs/_build/html
+%endif
+
 %install
 rm -rf $RPM_BUILD_ROOT
 
 %if %{with python2}
-%py_install \
-	--install-purelib=%{py_sitescriptdir}
+%py_install
 
 %py_postclean
 # tests
@@ -81,8 +109,7 @@ rm -rf $RPM_BUILD_ROOT
 %endif
 
 %if %{with python3}
-%py3_install \
-	--install-purelib=%{py3_sitescriptdir}
+%py3_install
 
 # tests
 %{__rm} $RPM_BUILD_ROOT%{py3_sitescriptdir}/zope/testing/{test_renormalizing,tests}.py*
@@ -108,3 +135,9 @@ rm -rf $RPM_BUILD_ROOT
 %{py3_sitescriptdir}/zope.testing-%{version}-py*.egg-info
 %{py3_sitescriptdir}/zope.testing-%{version}-py*-nspkg.pth
 %endif
+
+%if %{with doc}
+%files apidocs
+%defattr(644,root,root,755)
+%doc docs/_build/html/{_modules,_static,api,*.html,*.js}
+%endif
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-zope.testing.git/commitdiff/1378b97849bb353b2fcc1d74b87e78f15940ae70



More information about the pld-cvs-commit mailing list