[packages/python3-semver] Initial
arekm
arekm at pld-linux.org
Fri Feb 7 13:57:50 CET 2025
commit 7eb69f09b2fe1f1803048fbe9b6a0a295e3f3b1d
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Fri Feb 7 13:08:00 2025 +0100
Initial
python3-semver.spec | 89 +++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 89 insertions(+)
---
diff --git a/python3-semver.spec b/python3-semver.spec
new file mode 100644
index 0000000..c76b40d
--- /dev/null
+++ b/python3-semver.spec
@@ -0,0 +1,89 @@
+# Conditional build:
+%bcond_without doc # API documentation
+%bcond_without tests # unit tests
+
+%define module semver
+Summary: Module to simplify semantic versioning
+# Name must match the python module/package name (as on pypi or in 'import' statement)
+Name: python3-%{module}
+Version: 3.0.4
+Release: 1
+License: BSD
+Group: Libraries/Python
+Source0: https://pypi.debian.net/semver/%{module}-%{version}.tar.gz
+# Source0-md5: a0d76b528e489bf7ce1255a0a1486123
+URL: https://pypi.org/project/semver/
+BuildRequires: python3-build
+BuildRequires: python3-installer
+BuildRequires: python3-modules >= 1:3.2
+%if %{with tests}
+#BuildRequires: python3-
+%endif
+BuildRequires: rpm-pythonprov
+BuildRequires: rpmbuild(macros) >= 1.714
+%if %{with doc}
+BuildRequires: python3-sphinx_autodoc_typehints
+BuildRequires: sphinx-pdg-3
+%endif
+Requires: python3-modules >= 1:3.2
+BuildArch: noarch
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+A Python module to simplify semantic versioning.
+
+The module follows the MAJOR.MINOR.PATCH style:
+- MAJOR version when you make incompatible API changes,
+- MINOR version when you add functionality in a backwards compatible
+ manner, and
+- PATCH version when you make backwards compatible bug fixes.
+
+%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}
+PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
+PYTEST_PLUGINS=pytest_cov.plugin \
+%{__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 CHANGELOG.rst CONTRIBUTING.rst README.rst SUPPORT.md
+%attr(755,root,root) %{_bindir}/pysemver
+%{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-semver.git/commitdiff/7eb69f09b2fe1f1803048fbe9b6a0a295e3f3b1d
More information about the pld-cvs-commit
mailing list