[packages/python-webtest] - updated to 2.0.30, added -apidocs

qboosh qboosh at pld-linux.org
Sat Jul 21 21:22:11 CEST 2018


commit 7a08de335cca55e665bc9537fd95ab6a4f1979fe
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sat Jul 21 21:24:05 2018 +0200

    - updated to 2.0.30, added -apidocs

 python-webtest.spec | 136 ++++++++++++++++++++++++++++++++++++++--------------
 1 file changed, 100 insertions(+), 36 deletions(-)
---
diff --git a/python-webtest.spec b/python-webtest.spec
index bc5a519..4a8c75a 100644
--- a/python-webtest.spec
+++ b/python-webtest.spec
@@ -1,35 +1,61 @@
 #
-# TODO
-# - python3 tests broken
-
 # Conditional build:
+%bcond_without	python2	# CPython 2.x module
 %bcond_without	python3	# CPython 3.x module
-%bcond_without	tests	# do not perform "make test"
+%bcond_without	doc	# Sphinx documentation
+%bcond_without	tests	# unit tests
 
 %define 	module	webtest
 Summary:	Helper to test WSGI applications
+Summary(pl.UTF-8):	Moduł pomocniczy do testowania aplikacji WSGI
 Name:		python-%{module}
-Version:	1.3.4
-Release:	7
+Version:	2.0.30
+Release:	1
 License:	MIT
 Group:		Libraries/Python
-URL:		http://pythonpaste.org/webtest/
-BuildRequires:	rpmbuild(macros) >= 1.710
-Source0:	http://pypi.python.org/packages/source/W/WebTest/WebTest-%{version}.tar.gz
-# Source0-md5:	be4b448e91306f297e6e302c3ebe9540
-BuildRequires:	python-WebOb
+#Source0Download: https://pypi.org/simple/webtest/
+Source0:	https://files.pythonhosted.org/packages/source/W/WebTest/WebTest-%{version}.tar.gz
+# Source0-md5:	0dd5a9093922e08e452f60d7d2eae99a
+Patch0:		%{name}-deps.patch
+URL:		http://webtest.pythonpaste.org/
+%if %{with python2}
+BuildRequires:	python-modules >= 1:2.7
+BuildRequires:	python-setuptools
+%if %{with tests}
+BuildRequires:	python-PasteDeploy
+BuildRequires:	python-WSGIProxy2
+BuildRequires:	python-WebOb >= 1.2
+BuildRequires:	python-bs4
 BuildRequires:	python-dtopt
+BuildRequires:	python-lxml
+BuildRequires:	python-mock
 BuildRequires:	python-nose
-BuildRequires:	python-setuptools
-BuildRequires:	rpm-pythonprov
+BuildRequires:	python-pyquery
+BuildRequires:	python-six
+BuildRequires:	python-waitress >= 0.8.5
+%endif
+%endif
 %if %{with python3}
-BuildRequires:	python3-WebOb
-BuildRequires:	python3-devel
-BuildRequires:	python3-dtopt
-BuildRequires:	python3-modules
-BuildRequires:	python3-nose
+BuildRequires:	python3-modules >= 1:3.3
 BuildRequires:	python3-setuptools
+%if %{with tests}
+BuildRequires:	python3-PasteDeploy
+BuildRequires:	python3-WSGIProxy2
+BuildRequires:	python3-WebOb >= 1.2
+BuildRequires:	python3-bs4
+BuildRequires:	python3-dtopt
+BuildRequires:	python3-nose >= 1.3.1
+BuildRequires:	python3-pyquery
+BuildRequires:	python3-six
+BuildRequires:	python3-waitress >= 0.8.5
+%endif
 %endif
+BuildRequires:	rpm-pythonprov
+BuildRequires:	rpmbuild(macros) >= 1.714
+%if %{with doc}
+BuildRequires:	sphinx-pdg
+%endif
+Requires:	python-modules >= 1:2.7
 BuildArch:	noarch
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -40,9 +66,18 @@ requests to that application, without starting up an HTTP server.
 This provides convenient full-stack testing of applications written
 with any WSGI-compatible framework.
 
+%description -l pl.UTF-8
+WebTest obudowuje dowolną aplikację WSGI i ułatwia wysyłanie do niej
+testowych żądań bez uruchamiania serwera HTTP.
+
+Daje to wygodne, oparte o pełny stos testowanie aplikacji napisanych
+przy użyciu dowolnego szkieletu zgodnego z WSGI.
+
 %package -n python3-webtest
 Summary:	Helper to test WSGI applications
+Summary(pl.UTF-8):	Moduł pomocniczy do testowania aplikacji WSGI
 Group:		Libraries/Python
+Requires:	python3-modules >= 1:3.3
 
 %description -n python3-webtest
 WebTest wraps any WSGI application and makes it easy to send test
@@ -51,50 +86,79 @@ requests to that application, without starting up an HTTP server.
 This provides convenient full-stack testing of applications written
 with any WSGI-compatible framework.
 
+%description -n python3-webtest -l pl.UTF-8
+WebTest obudowuje dowolną aplikację WSGI i ułatwia wysyłanie do niej
+testowych żądań bez uruchamiania serwera HTTP.
+
+Daje to wygodne, oparte o pełny stos testowanie aplikacji napisanych
+przy użyciu dowolnego szkieletu zgodnego z WSGI.
+
+%package apidocs
+Summary:	API documentation for Python WebTest module
+Summary(pl.UTF-8):	Dokumentacja API modułu Pythona WebTest
+Group:		Documentation
+
+%description apidocs
+API documentation for Python WebTest module.
+
+%description apidocs -l pl.UTF-8
+Dokumentacja API modułu Pythona WebTest.
+
 %prep
 %setup -q -n WebTest-%{version}
+%patch0 -p1
 
-# Remove bundled egg info if it exists.
-rm -r *.egg-info
+# Remove bundled egg info
+%{__rm} -r *.egg-info
 
 %build
-%py_build
-
-%if %{with python3}
-%py3_build
+%if %{with python2}
+%py_build %{?with_tests:test}
 %endif
 
-%if %{with tests}
-PYTHONPATH=build-2/lib %{__python} setup.py test
-
 %if %{with python3}
-#PYTHONPATH=build-3/lib %{__python3} setup.py test
+%py3_build %{?with_tests:test}
 %endif
+
+%if %{with doc}
+PYTHONPATH=$(pwd) \
+%{__make} -C docs html
 %endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
+
+%if %{with python2}
+%py_install
+
+%py_postclean
+%endif
+
 %if %{with python3}
 %py3_install
 %endif
 
-%py_install
-
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%if %{with python2}
 %files
 %defattr(644,root,root,755)
-%doc docs/*
-%{py_sitescriptdir}/%{module}
+%doc CHANGELOG.rst README.rst docs/license.rst
+%{py_sitescriptdir}/webtest
 %{py_sitescriptdir}/WebTest-%{version}-py*.egg-info
+%endif
 
 %if %{with python3}
 %files -n python3-webtest
 %defattr(644,root,root,755)
-%doc docs/*
+%doc CHANGELOG.rst README.rst docs/license.rst
+%{py3_sitescriptdir}/webtest
 %{py3_sitescriptdir}/WebTest-%{version}-py*.egg-info
-%dir %{py3_sitescriptdir}/webtest
-%{py3_sitescriptdir}/%{module}/*.py
-%{py3_sitescriptdir}/%{module}/__pycache__
+%endif
+
+%if %{with doc}
+%files apidocs
+%defattr(644,root,root,755)
+%doc docs/_build/html/{_static,*.html,*.js}
 %endif
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-webtest.git/commitdiff/7a08de335cca55e665bc9537fd95ab6a4f1979fe



More information about the pld-cvs-commit mailing list