[packages/python3-installer] Initial version (docs and tests are not done)
arekm
arekm at pld-linux.org
Fri Feb 7 13:32:43 CET 2025
commit c05e3c66664ca2bbc1c7747b73a8ec45e739cb0d
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Fri Feb 7 12:40:33 2025 +0100
Initial version (docs and tests are not done)
python3-installer.spec | 88 ++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 88 insertions(+)
---
diff --git a/python3-installer.spec b/python3-installer.spec
new file mode 100644
index 0000000..956c501
--- /dev/null
+++ b/python3-installer.spec
@@ -0,0 +1,88 @@
+# Conditional build:
+%bcond_without doc # API documentation
+%bcond_without tests # unit tests
+
+%define module installer
+Summary: A library for installing Python wheels
+# Name must match the python module/package name (as on pypi or in 'import' statement)
+Name: python3-%{module}
+Version: 0.7.0
+Release: 1
+License: MIT
+Group: Libraries/Python
+Source0: https://pypi.debian.net/installer/%{module}-%{version}.tar.gz
+# Source0-md5: d961d1105c9270049528b1167ed021bc
+URL: https://pypi.org/project/installer/
+BuildRequires: python3-installer
+BuildRequires: python3-modules >= 1:3.2
+%if %{with tests}
+#BuildRequires: python3-
+%endif
+BuildRequires: rpm-pythonprov
+BuildRequires: rpmbuild(macros) >= 1.714
+# when using /usr/bin/env or other in-place substitutions
+#BuildRequires: sed >= 4.0
+%if %{with doc}
+BuildRequires: sphinx-pdg-3
+# or
+BuildRequires: python3-tox
+%endif
+# replace with other requires if defined in setup.py
+Requires: python3-modules >= 1:3.2
+BuildArch: noarch
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+This is a low-level library for installing a Python package from a
+wheel distribution. It provides basic functionality and abstractions
+for handling wheels and installing packages from wheels.
+
+%package apidocs
+Summary: API documentation for Python %{module} module
+Summary(pl.UTF-8): Dokumentacja API modułu Pythona %{module}
+Group: Documentation
+
+%description apidocs
+API documentation for Python %{module} module.
+
+%description apidocs -l pl.UTF-8
+Dokumentacja API modułu Pythona %{module}.
+
+%prep
+%setup -q -n %{module}-%{version}
+
+%build
+%{__python3} -m build --wheel --no-isolation --outdir build-3
+
+%if %{with tests}
+# use explicit plugins list for reliable builds (delete PYTEST_PLUGINS if empty)
+PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
+PYTEST_PLUGINS= \
+%{__python3} -m pytest tests
+%endif
+
+%if %{with doc}
+%{__make} -C docs html \
+ SPHINXBUILD=sphinx-build-3
+rm -rf docs/_build/html/_sources
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__python3} -m installer --destdir=$RPM_BUILD_ROOT build-3/*.whl
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc CONTRIBUTING.md README.md
+%{py3_sitescriptdir}/%{module}
+%{py3_sitescriptdir}/%{module}-%{version}.dist-info
+
+%if %{with doc}
+%files apidocs
+%defattr(644,root,root,755)
+%doc docs/_build/html/*
+%endif
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python3-installer.git/commitdiff/c05e3c66664ca2bbc1c7747b73a8ec45e739cb0d
More information about the pld-cvs-commit
mailing list