[packages/python3-pyproject-api] - new
baggins
baggins at pld-linux.org
Thu Mar 27 23:24:08 CET 2025
commit 79f135af3ffb60ee0d8db92e9672adec0790a3fa
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Fri Mar 28 00:23:59 2025 +0100
- new
python3-pyproject-api.spec | 97 ++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 97 insertions(+)
---
diff --git a/python3-pyproject-api.spec b/python3-pyproject-api.spec
new file mode 100644
index 0000000..2eb74ac
--- /dev/null
+++ b/python3-pyproject-api.spec
@@ -0,0 +1,97 @@
+# Conditional build:
+%bcond_without doc # API documentation
+%bcond_without tests # unit tests
+
+%define module pyproject-api
+Summary: API to interact with the python pyproject.toml based projects
+# Name must match the python module/package name (as on pypi or in 'import' statement)
+Name: python3-%{module}
+Version: 1.9.0
+Release: 1
+License: MIT
+Group: Libraries/Python
+#Source0Download: https://pypi.org/simple/pyproject-api/
+Source0: https://files.pythonhosted.org/packages/source/p/pyproject-api/pyproject_api-%{version}.tar.gz
+# Source0-md5: 4ec4e4038061c0a5eb88f9ee4754f809
+URL: https://pypi.org/project/pyproject-api/
+BuildRequires: python3-modules >= 1:3.2
+BuildRequires: python3-build
+BuildRequires: python3-installer
+%if %{with tests}
+BuildRequires: python3-pytest >= 8.3.4
+BuildRequires: python3-pytest-cov >= 6
+BuildRequires: python3-pytest-mock >= 3.14
+%endif
+BuildRequires: rpm-pythonprov
+BuildRequires: rpmbuild(macros) >= 2.044
+%if %{with doc}
+BuildRequires: sphinx-pdg-3
+# or
+BuildRequires: python3-tox
+%endif
+Requires: python3-modules >= 1:3.2
+BuildArch: noarch
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+
+%description -l pl.UTF-8
+
+%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 pyproject_api-%{version}
+
+%build
+%py3_build_pyproject
+
+%if %{with tests}
+%{__python3} -m zipfile -e build-3/*.whl build-3-test
+# use explicit plugins list for reliable builds (delete PYTEST_PLUGINS if empty)
+PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
+PYTEST_PLUGINS= \
+%{__python3} -m pytest -o pythonpath="$PWD/build-3-test" tests
+%endif
+
+%if %{with doc}
+%{__make} -C docs html \
+ SPHINXBUILD=sphinx-build-3
+rm -rf docs/_build/html/_sources
+
+# or
+
+%{_bindir}/tox -e docs
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%py3_install_pyproject
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc README.md
+%dir %{py3_sitescriptdir}/pyproject_api
+%{py3_sitescriptdir}/pyproject_api/*.py
+%{py3_sitescriptdir}/pyproject_api/*.pyi
+%{py3_sitescriptdir}/pyproject_api/py.typed
+%{py3_sitescriptdir}/pyproject_api/__pycache__
+%{py3_sitescriptdir}/pyproject_api-%{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-pyproject-api.git/commitdiff/79f135af3ffb60ee0d8db92e9672adec0790a3fa
More information about the pld-cvs-commit
mailing list