commit 35f2120e21a6cc3a6db575b394d98a9f5438f891
Author: Jakub Bogusz <[email protected]>
Date:   Sat Jul 21 07:43:40 2018 +0200

    - updated to 1.0.3, added -apidocs

 python-cssselect.spec | 81 ++++++++++++++++++++++++++++++++++-----------------
 1 file changed, 54 insertions(+), 27 deletions(-)
---
diff --git a/python-cssselect.spec b/python-cssselect.spec
index fa16d37..7e04541 100644
--- a/python-cssselect.spec
+++ b/python-cssselect.spec
@@ -1,38 +1,42 @@
+#
 # 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_with    tests   # unit tests [tests missing in archive as of 1.0.3]
+%bcond_without python2 # CPython 2.x module
+%bcond_without python3 # CPython 3.x module
 #
 %define        module  cssselect
 Summary:       Python moudle for parsing CSS3 Selectors and translating them 
to XPath 1.0 expressions
 Summary(pl.UTF-8):     Moduł pythona interpretujący selektory CSS i tłumaczący 
je na wyrażenia XPath 1.0
 Name:          python-%{module}
-Version:       0.9.1
-Release:       5
+Version:       1.0.3
+Release:       1
 License:       BSD
 Group:         Development/Languages/Python
-Source0:       
http://pypi.python.org/packages/source/c/%{module}/%{module}-%{version}.tar.gz
-# Source0-md5: c74f45966277dc7a0f768b9b0f3522ac
+#Source0Download: https://pypi.org/simple/cssselect/
+Source0:       
https://files.pythonhosted.org/packages/source/c/cssselect/%{module}-%{version}.tar.gz
+# Source0-md5: 50422c9ec04b74cd60c571f74ddc1a80
 URL:           http://packages.python.org/cssselect/
 BuildRequires: rpm-pythonprov
-BuildRequires: rpmbuild(macros) >= 1.710
+BuildRequires: rpmbuild(macros) >= 1.714
 %if %{with python2}
-BuildRequires: python-devel
-BuildRequires: python-distribute
+BuildRequires: python-devel >= 1:2.7
+BuildRequires: python-setuptools
 %if %{with tests}
 BuildRequires: python-lxml
 %endif
 %endif
 %if %{with python3}
-BuildRequires: python3-devel
-BuildRequires: python3-distribute
-BuildRequires: python3-modules
+BuildRequires: python3-devel >= 1:3.4
+BuildRequires: python3-setuptools
 %if %{with tests}
 BuildRequires: python3-lxml
 %endif
 %endif
-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)
 
@@ -45,16 +49,16 @@ extracted as a stand-alone project.
 
 %description -l pl.UTF-8
 cssselect interpretuje selektory CSS3 i tłumaczy je na wyrażenia XPath
-1.0. Owe wyreażenia mogą być późnije użyte w lxml lub w innym kodzie
+1.0. Owe wyreażenia mogą być później użyte w lxml lub w innym kodzie
 XPath do znajdywania pasujących elementów w dokumentach XML lub HTML.
-Ten moduł był częścią lxml jako lxml.cssselct zanim został wydzielony
+Ten moduł był częścią lxml jako lxml.cssselect zanim został wydzielony
 jako osobny projekt.
 
 %package -n python3-%{module}
 Summary:       Python moudle for parsing CSS3 Selectors and translating them 
to XPath 1.0 expressions
 Summary(pl.UTF-8):     Moduł pythona interpretujący selektory CSS i tłumaczący 
je na wyrażenia XPath 1.0
 Group:         Libraries/Python
-Requires:      python3-modules
+Requires:      python3-modules >= 1:3.4
 
 %description -n python3-%{module}
 cssselect parses CSS3 Selectors and translate them to XPath 1.0
@@ -65,11 +69,22 @@ extracted as a stand-alone project.
 
 %description -n python3-%{module} -l pl.UTF-8
 cssselect interpretuje selektory CSS3 i tłumaczy je na wyrażenia XPath
-1.0. Owe wyreażenia mogą być późnije użyte w lxml lub w innym kodzie
+1.0. Owe wyreażenia mogą być później użyte w lxml lub w innym kodzie
 XPath do znajdywania pasujących elementów w dokumentach XML lub HTML.
-Ten moduł był częścią lxml jako lxml.cssselct zanim został wydzielony
+Ten moduł był częścią lxml jako lxml.cssselect zanim został wydzielony
 jako osobny projekt.
 
+%package apidocs
+Summary:       API documentation for Python cssselect module
+Summary(pl.UTF-8):     Dokumentacja API modułu Pythona cssselect
+Group:         Documentation
+
+%description apidocs
+API documentation for Python cssselect module.
+
+%description apidocs -l pl.UTF-8
+Dokumentacja API modułu Pythona cssselect.
+
 %prep
 %setup -q -n %{module}-%{version}
 
@@ -82,6 +97,13 @@ jako osobny projekt.
 %py3_build %{?with_tests:test}
 %endif
 
+%if %{with doc}
+# no Makefile...
+cd docs
+PYTHONPATH=$(pwd)/.. \
+sphinx-build -b html . _build/html
+%endif
+
 %install
 rm -rf $RPM_BUILD_ROOT
 
@@ -101,16 +123,21 @@ rm -rf $RPM_BUILD_ROOT
 %if %{with python2}
 %files
 %defattr(644,root,root,755)
-# %doc AUTHORS CREDITS ChangeLog NEWS README THANKS TODO
-%if "%{py_ver}" > "2.4"
-%{py_sitescriptdir}/%{module}-*.egg-info
-%endif
-%{py_sitescriptdir}/%{module}
+%doc AUTHORS CHANGES LICENSE README.rst
+%{py_sitescriptdir}/cssselect
+%{py_sitescriptdir}/cssselect-%{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 AUTHORS CHANGES LICENSE README.rst
+%{py3_sitescriptdir}/cssselect
+%{py3_sitescriptdir}/cssselect-%{version}-py*.egg-info
+%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-cssselect.git/commitdiff/35f2120e21a6cc3a6db575b394d98a9f5438f891

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to