[packages/python3-w3lib] - new, python-w3lib for python 3.9+
qboosh
qboosh at pld-linux.org
Mon Jul 14 21:57:44 CEST 2025
commit b7fb5b6b916c0a43a75c8f09c31713325ca350d6
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Mon Jul 14 21:59:13 2025 +0200
- new, python-w3lib for python 3.9+
python3-w3lib.spec | 99 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 99 insertions(+)
---
diff --git a/python3-w3lib.spec b/python3-w3lib.spec
new file mode 100644
index 0000000..8254f0c
--- /dev/null
+++ b/python3-w3lib.spec
@@ -0,0 +1,99 @@
+#
+# 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: python3-w3lib
+Version: 2.3.1
+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: 7ef432898835f79a3c11100a992dbd03
+URL: https://pypi.org/project/w3lib/
+BuildRequires: python3-modules >= 1:3.9
+BuildRequires: python3-setuptools
+%if %{with tests}
+BuildRequires: python3-pytest
+%endif
+BuildRequires: rpm-pythonprov
+BuildRequires: rpmbuild(macros) >= 1.714
+%if %{with doc}
+BuildRequires: python3-sphinx-hoverxref
+BuildRequires: python3-sphinx-notfound-page
+BuildRequires: sphinx-pdg-3
+%endif
+Requires: python3-modules >= 1:3.9
+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
+%py3_build
+
+%if %{with tests}
+PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
+%{__python3} -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
+
+%py3_install
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc LICENSE NEWS README.rst
+%{py3_sitescriptdir}/w3lib
+%{py3_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/python3-w3lib.git/commitdiff/b7fb5b6b916c0a43a75c8f09c31713325ca350d6
More information about the pld-cvs-commit
mailing list