[packages/python-rfc3986] - updated to 1.5.0
qboosh
qboosh at pld-linux.org
Sat Jan 20 12:35:35 CET 2024
commit 76ddad46b9ef019e21d3c5181adadb0c4cbcb0a2
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sat Jan 20 11:37:01 2024 +0100
- updated to 1.5.0
python-rfc3986.spec | 72 +++++++++++++++++++++++++++++++++++++++--------------
1 file changed, 53 insertions(+), 19 deletions(-)
---
diff --git a/python-rfc3986.spec b/python-rfc3986.spec
index ca0ee22..54d888a 100644
--- a/python-rfc3986.spec
+++ b/python-rfc3986.spec
@@ -1,28 +1,42 @@
#
# Conditional build:
-%bcond_with doc # do build doc (broken)
-%bcond_with tests # do perform "make test" (broken)
+%bcond_without doc # Sphinx documentation
+%bcond_without tests # unit tests
%bcond_without python2 # CPython 2.x module
%bcond_without python3 # CPython 3.x module
Summary: Validating URI References per RFC 3986
+Summary(pl.UTF-8): Sprawdzanie poprawności URI według RFC 3986
Name: python-rfc3986
-Version: 1.1.0
-Release: 7
-License: Apache
+# keep 1.x here for python2 support
+Version: 1.5.0
+Release: 1
+License: Apache v2.0
Group: Libraries/Python
Source0: https://files.pythonhosted.org/packages/source/r/rfc3986/rfc3986-%{version}.tar.gz
-# Source0-md5: fca89d6e949c31922ef82422ace66842
-URL: https://pypi.python.org/pypi/rfc3986
-BuildRequires: rpm-pythonprov
-BuildRequires: rpmbuild(macros) >= 1.714
+# Source0-md5: 0e3a03c3eb3b679d5a253b168bb5774a
+URL: https://pypi.org/project/rfc3986
%if %{with python2}
+BuildRequires: python-modules >= 1:2.7
BuildRequires: python-setuptools
+%if %{with tests}
+BuildRequires: python-pytest
+%endif
%endif
%if %{with python3}
+BuildRequires: python3-modules >= 1:3.4
BuildRequires: python3-setuptools
+%if %{with tests}
+BuildRequires: python3-pytest
+%endif
+%endif
+BuildRequires: rpm-pythonprov
+BuildRequires: rpmbuild(macros) >= 1.714
+%if %{with doc}
+BuildRequires: python-sphinx-prompt
+BuildRequires: sphinx-pdg-2
%endif
-Requires: python-modules
+Requires: python-modules >= 1:2.7
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -30,15 +44,24 @@ BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
A Python implementation of RFC 3986 including validation and authority
parsing.
+%description -l pl.UTF-8
+Pythonowa implementacja RFC 3986 obejmująca sprawdzanie poprawności i
+analizę wiarygodności.
+
%package -n python3-rfc3986
Summary: Validating URI References per RFC 3986
+Summary(pl.UTF-8): Sprawdzanie poprawności URI według RFC 3986
Group: Libraries/Python
-Requires: python3-modules
+Requires: python3-modules >= 1:3.4
%description -n python3-rfc3986
A Python implementation of RFC 3986 including validation and authority
parsing.
+%description -n python3-rfc3986 -l pl.UTF-8
+Pythonowa implementacja RFC 3986 obejmująca sprawdzanie poprawności i
+analizę wiarygodności.
+
%package apidocs
Summary: API documentation for Python rfc3986 module
Summary(pl.UTF-8): Dokumentacja API modułu Pythona rfc3986
@@ -55,17 +78,28 @@ Dokumentacja API modułu Pythona rfc3986.
%build
%if %{with python2}
-%py_build %{?with_tests:test}
+%py_build
+
+%if %{with tests}
+PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
+PYTHONPATH=$(pwd)/src \
+%{__python} -m pytest tests
+%endif
%endif
%if %{with python3}
-%py3_build %{?with_tests:test}
+%py3_build
+
+%if %{with tests}
+PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
+PYTHONPATH=$(pwd)/src \
+%{__python3} -m pytest tests
+%endif
%endif
%if %{with doc}
-cd docs
-%{__make} -j1 html
-rm -rf _build/html/_sources
+PYTHONPATH=$(pwd)/src \
+sphinx-build-2 docs/source docs/build/html
%endif
%install
@@ -87,7 +121,7 @@ rm -rf $RPM_BUILD_ROOT
%if %{with python2}
%files
%defattr(644,root,root,755)
-%doc AUTHORS.rst README.rst
+%doc AUTHORS.rst LICENSE README.rst
%{py_sitescriptdir}/rfc3986
%{py_sitescriptdir}/rfc3986-%{version}-py*.egg-info
%endif
@@ -95,7 +129,7 @@ rm -rf $RPM_BUILD_ROOT
%if %{with python3}
%files -n python3-rfc3986
%defattr(644,root,root,755)
-%doc AUTHORS.rst README.rst
+%doc AUTHORS.rst LICENSE README.rst
%{py3_sitescriptdir}/rfc3986
%{py3_sitescriptdir}/rfc3986-%{version}-py*.egg-info
%endif
@@ -103,5 +137,5 @@ rm -rf $RPM_BUILD_ROOT
%if %{with doc}
%files apidocs
%defattr(644,root,root,755)
-%doc docs/_build/html/*
+%doc docs/build/html/{_static,api-ref,release-notes,user,*.html,*.js}
%endif
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python-rfc3986.git/commitdiff/76ddad46b9ef019e21d3c5181adadb0c4cbcb0a2
More information about the pld-cvs-commit
mailing list