[packages/python-pyquery] - updated to 1.4.0, added -apidocs

qboosh qboosh at pld-linux.org
Sat Jul 21 21:07:12 CEST 2018


commit 5f5a14acb41a376d14b5005a35eab75609f96c01
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sat Jul 21 21:09:08 2018 +0200

    - updated to 1.4.0, added -apidocs

 python-pyquery.spec | 94 ++++++++++++++++++++++++++++++++++++-----------------
 1 file changed, 64 insertions(+), 30 deletions(-)
---
diff --git a/python-pyquery.spec b/python-pyquery.spec
index 6788486..bc8044a 100644
--- a/python-pyquery.spec
+++ b/python-pyquery.spec
@@ -1,46 +1,50 @@
 #
 # Conditional build:
-%bcond_without  doc             # don't build doc
-%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	# Sphinx documentation
+%bcond_without	tests	# unit tests
+%bcond_without	python2	# CPython 2.x module
+%bcond_without	python3	# CPython 3.x module
 
 %define 	module	pyquery
 Summary:	A jquery-like library for Python
 Summary(pl.UTF-8):	Podobna do jquery biblioteka dla Pythona
 Name:		python-%{module}
-Version:	1.2.9
-Release:	6
+Version:	1.4.0
+Release:	1
 License:	BSD
-Group:		Development/Languages/Python
-# Source0:	http://pypi.python.org/packages/source/p/pyquery/%{module}-%{version}.tar.gz
-Source0:	https://github.com/gawel/pyquery/archive/%{version}.tar.gz
-# Source0-md5:	902e2ded38899c7c3f66cba6d4a464fb
-URL:		http://pypi.python.org/pypi/pyquery
+Group:		Libraries/Python
+#Source0Download: https://pypi.org/simple/pyquery/
+Source0:	http://files.pythonhosted.org/packages/source/p/pyquery/%{module}-%{version}.tar.gz
+# Source0-md5:	a4aec587d6dcb01cf6fb7564bcedd2b7
+URL:		http://pypi.org/project/pyquery/
 BuildRequires:	rpm-pythonprov
-BuildRequires:	rpmbuild(macros) >= 1.710
+BuildRequires:	rpmbuild(macros) >= 1.714
 %if %{with python2}
-BuildRequires:	python-devel
+BuildRequires:	python-devel >= 1:2.7
 BuildRequires:	python-setuptools
 %if %{with tests}
 BuildRequires:	python-WebOb
-BuildRequires:	python-cssselect
+BuildRequires:	python-cssselect > 0.7.9
+BuildRequires:	python-lxml >= 2.1
+BuildRequires:	python-nose
 BuildRequires:	python-webtest
 %endif
 %endif
 %if %{with python3}
-BuildRequires:	python3-devel
-BuildRequires:	python3-modules
+BuildRequires:	python3-devel >= 1:3.3
 BuildRequires:	python3-setuptools
 %if %{with tests}
 BuildRequires:	python3-WebOb
-BuildRequires:	python3-cssselect
+BuildRequires:	python3-cssselect > 0.7.9
+BuildRequires:	python3-lxml >= 2.1
+BuildRequires:	python3-nose
 BuildRequires:	python3-webtest
 %endif
 %endif
-Requires:	python-cssselect
-Requires:	python-lxml
-Requires:	python-modules
+%if %{with doc}
+BuildRequires:	sphinx-pdg
+%endif
+Requires:	python-modules >= 1:2.7
 BuildArch:	noarch
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -58,9 +62,7 @@ lxml do szybkiej manipulacji plików XML i HTML.
 Summary:	A jquery-like library for Python
 Summary(pl.UTF-8):	Podobna do jquery biblioteka dla Pythona
 Group:		Libraries/Python
-Requires:	python3-cssselect
-Requires:	python3-lxml
-Requires:	python3-modules
+Requires:	python3-modules >= 1:3.3
 
 %description -n python3-%{module}
 Pyquery allows you to make jquery queries on xml documents. The API is
@@ -72,16 +74,41 @@ Pyquery pozwala na wykonywanie zapytań jquery na dokumentach XML.
 Interfejs jest jak to tylko możliwe podobny do jquery. Pyquery używa
 lxml do szybkiej manipulacji plików XML i HTML.
 
+%package apidocs
+Summary:	API documentation for Python pyquery module
+Summary(pl.UTF-8):	Dokumentacja API modułu Pythona pyquery
+Group:		Documentation
+
+%description apidocs
+API documentation for Python pyquery module.
+
+%description apidocs -l pl.UTF-8
+Dokumentacja API modułu Pythona pyquery.
+
 %prep
 %setup -q -n %{module}-%{version}
 
 %build
 %if %{with python2}
-%py_build %{?with_tests:test}
+%py_build
+
+%if %{with tests}
+nosetests-%{py_ver} tests
+%endif
 %endif
 
 %if %{with python3}
-%py3_build %{?with_tests:test}
+%py3_build
+
+%if %{with tests}
+nosetests-%{py3_ver} tests
+%endif
+%endif
+
+%if %{with doc}
+PYTHONPATH=$(pwd) \
+%{__make} -C docs html \
+	SPHINXBUILD=sphinx-build
 %endif
 
 %install
@@ -103,14 +130,21 @@ rm -rf $RPM_BUILD_ROOT
 %if %{with python2}
 %files
 %defattr(644,root,root,755)
-%dir %{py_sitescriptdir}/%{module}
-%{py_sitescriptdir}/%{module}/*.py[co]
-%{py_sitescriptdir}/pyquery-*.egg-info
+%doc CHANGES.rst LICENSE.txt README.rst
+%{py_sitescriptdir}/pyquery
+%{py_sitescriptdir}/pyquery-%{version}-py*.egg-info
 %endif
 
 %if %{with python3}
 %files -n python3-%{module}
 %defattr(644,root,root,755)
-%{py3_sitescriptdir}/%{module}
-%{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
+%doc CHANGES.rst LICENSE.txt README.rst
+%{py3_sitescriptdir}/pyquery
+%{py3_sitescriptdir}/pyquery-%{version}-py*.egg-info
+%endif
+
+%if %{with doc}
+%files apidocs
+%defattr(644,root,root,755)
+%doc docs/_build/html/{_modules,_static,*.html,*.js}
 %endif
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-pyquery.git/commitdiff/5f5a14acb41a376d14b5005a35eab75609f96c01



More information about the pld-cvs-commit mailing list