[packages/python-w3lib] - new; 1.x tests failed for python3

qboosh qboosh at pld-linux.org
Mon Jul 14 21:56:58 CEST 2025


commit b4ddc3c08070dda2f7339d4818a4f19ecd029e02
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Mon Jul 14 21:58:30 2025 +0200

    - new; 1.x tests failed for python3

 python-w3lib.spec | 104 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 104 insertions(+)
---
diff --git a/python-w3lib.spec b/python-w3lib.spec
new file mode 100644
index 0000000..f7cf65e
--- /dev/null
+++ b/python-w3lib.spec
@@ -0,0 +1,104 @@
+#
+# Conditional build:
+%bcond_without	doc	# Sphinx documentation
+%bcond_without	tests	# unit tests
+
+Summary:	Library of web-related functions
+Summary(pl.UTF-8):	Biblioteka funkcji związanych z WWW
+Name:		python-w3lib
+# keep 1.x here for python2 support
+Version:	1.22.0
+Release:	1
+License:	BSD
+Group:		Libraries/Python
+#Source0Download: https://pypi.org/simple/w3lib/
+Source0:	https://files.pythonhosted.org/packages/source/w/w3lib/w3lib-%{version}.tar.gz
+# Source0-md5:	2eceef8cc9e3be81ae3eb825c23449cb
+URL:		https://pypi.org/project/w3lib/
+BuildRequires:	python-modules >= 1:2.7
+BuildRequires:	python-setuptools
+%if %{with tests}
+BuildRequires:	python-pytest
+BuildRequires:	python-six >= 1.4.1
+%endif
+BuildRequires:	rpm-pythonprov
+BuildRequires:	rpmbuild(macros) >= 1.714
+%if %{with doc}
+# use python3, there is no hoverxref.extension for python2
+BuildRequires:	python3-sphinx-hoverxref
+BuildRequires:	python3-sphinx-notfound-page
+BuildRequires:	sphinx-pdg-3
+%endif
+Requires:	python-modules >= 1:2.7
+BuildArch:	noarch
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+This is a Python library of web-related functions, such as:
+- remove comments, or tags from HTML snippets
+- extract base URL from HTML snippets
+- translate entites on HTML strings
+- convert raw HTTP headers to dicts and vice-versa
+- construct HTTP auth header
+- converting HTML pages to unicode
+- sanitize URLs (like browsers do)
+- extract arguments from URLs
+
+%description -l pl.UTF-8
+Biblioteka Pythona zawierająca funkcje związane z WWW, takie jak:
+- usuwanie komentarzy lub znaczników z fragmentów HTML-a
+- wydobywanie bazowych URL-i z fragmentów HTML-a
+- tłumaczenie encji w tekście HTML
+- konwersja surowych nagłówków HTTP na słownik i z powrotem
+- tworzenie nagłówka HTTP auth
+- czyszczenie URL-i (jak robią to przeglądarki)
+- wydobywanie argumentów z URL-i
+
+%package apidocs
+Summary:	API documentation for Python w3lib module
+Summary(pl.UTF-8):	Dokumentacja API modułu Pythona w3lib
+Group:		Documentation
+
+%description apidocs
+API documentation for Python w3lib module.
+
+%description apidocs -l pl.UTF-8
+Dokumentacja API modułu Pythona w3lib.
+
+%prep
+%setup -q -n w3lib-%{version}
+
+%build
+%py_build
+
+%if %{with tests}
+PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
+%{__python} -m pytest --doctest-modules w3lib tests
+%endif
+
+%if %{with doc}
+%{__make} -C docs html \
+	SPHINXBUILD=sphinx-build-3
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%py_install
+
+%py_postclean
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc LICENSE README.rst
+%{py_sitescriptdir}/w3lib
+%{py_sitescriptdir}/w3lib-%{version}-py*.egg-info
+
+%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-w3lib.git/commitdiff/b4ddc3c08070dda2f7339d4818a4f19ecd029e02



More information about the pld-cvs-commit mailing list