[packages/python3-url-py] - initial; need to vendor crates for offline build
qboosh
qboosh at pld-linux.org
Fri Jul 18 21:00:35 CEST 2025
commit d4c649b2340d3b741f8ebb57553003fecd33c9ec
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Fri Jul 18 21:02:08 2025 +0200
- initial; need to vendor crates for offline build
python3-url-py.spec | 104 ++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 104 insertions(+)
---
diff --git a/python3-url-py.spec b/python3-url-py.spec
new file mode 100644
index 0000000..1a7ceb0
--- /dev/null
+++ b/python3-url-py.spec
@@ -0,0 +1,104 @@
+# TODO: vendor crates
+#
+# Conditional build:
+%bcond_without doc # API documentation
+%bcond_without tests # unit tests
+
+Summary: Python bindings to Rust's url crate (from Servo)
+Summary(pl.UTF-8): Wiązania Pythona do paki Rusta url (z projektu Servo)
+Name: python3-url-py
+Version: 0.17.0
+Release: 1
+License: MIT
+Group: Libraries/Python
+#Source0Download: https://pypi.org/simple/url-py/
+Source0: https://files.pythonhosted.org/packages/source/u/url-py/url_py-%{version}.tar.gz
+# Source0-md5: f9fdebd536424d919033a4a89b296d4c
+URL: https://pypi.org/project/url-py/
+BuildRequires: python3-build
+BuildRequires: python3-devel >= 1:3.9
+BuildRequires: python3-installer
+BuildRequires: python3-maturin >= 1.2
+BuildRequires: python3-maturin < 2
+%if %{with tests}
+BuildRequires: python3-pytest
+%endif
+BuildRequires: rpm-build >= 4.6
+BuildRequires: rpm-pythonprov
+BuildRequires: rpmbuild(macros) >= 2.044
+# highest version from vendored crates (no version specified in global Cargo.toml)
+BuildRequires: rust >= 1.82
+%if %{with doc}
+BuildRequires: python3-furo
+BuildRequires: python3-pygments-github-lexers
+BuildRequires: python3-sphinx_copybutton
+BuildRequires: python3-sphinxcontrib-spelling > 5
+BuildRequires: python3-sphinxext.opengraph
+BuildRequires: sphinx-pdg-3 > 5
+%endif
+Requires: python3-modules >= 1:3.9
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+Python bindings to the Rust url crate (<https://docs.rs/url/>).
+
+%description -l pl.UTF-8
+Wiązania Pythona do paki Rusta url (<https://docs.rs/url/>).
+
+%package apidocs
+Summary: API documentation for Python url_py module
+Summary(pl.UTF-8): Dokumentacja API modułu Pythona url_py
+Group: Documentation
+BuildArch: noarch
+
+%description apidocs
+API documentation for Python url_py module.
+
+%description apidocs -l pl.UTF-8
+Dokumentacja API modułu Pythona url_py.
+
+%prep
+%setup -q -n url_py-%{version}
+
+%build
+%py3_build_pyproject
+
+%if %{with tests} || %{with doc}
+%{__python3} -m zipfile -e build-3/*.whl build-3-ext
+%endif
+
+%if %{with tests}
+PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
+%{__python3} -m pytest -o pythonpath="$PWD/build-3-ext" tests
+%endif
+
+%if %{with doc}
+PYTHONPATH=$(pwd)/build-3-ext \
+%{__make} -C docs html \
+ SPHINXBUILD=sphinx-build-3
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%py3_install_pyproject
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc LICENSE README.rst
+%dir %{py3_sitedir}/url
+%attr(755,root,root) %{py3_sitedir}/url/url.cpython-*.so
+%{py3_sitedir}/url/__init__.py
+%{py3_sitedir}/url/__init__.pyi
+%{py3_sitedir}/url/py.typed
+%{py3_sitedir}/url/__pycache__
+%{py3_sitedir}/url_py-%{version}.dist-info
+
+%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/python3-url-py.git/commitdiff/d4c649b2340d3b741f8ebb57553003fecd33c9ec
More information about the pld-cvs-commit
mailing list