[packages/python-semantic_version] - updated to 2.9.0, added tests and apidocs
qboosh
qboosh at pld-linux.org
Tue Mar 8 21:13:21 CET 2022
commit 6054ec1ca72a28f0b129512311c69a6803396d6e
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Tue Mar 8 21:15:21 2022 +0100
- updated to 2.9.0, added tests and apidocs
python-semantic_version.spec | 65 ++++++++++++++++++++++++++++++++++++++++----
1 file changed, 59 insertions(+), 6 deletions(-)
---
diff --git a/python-semantic_version.spec b/python-semantic_version.spec
index 53294d4..0a20f70 100644
--- a/python-semantic_version.spec
+++ b/python-semantic_version.spec
@@ -1,24 +1,36 @@
+# TODO: run tests using nose2 instead of nose (following upstream)
+#
+# Conditional build:
+%bcond_without doc # Sphinx documentation
+%bcond_without tests # unit tests
%bcond_without python2 # CPython 2.x module
%bcond_without python3 # CPython 3.x module
%define module semantic_version
Summary: A library implementing the 'SemVer' scheme
+Summary(pl.UTF-8): Biblioteka implementująca schemat "SemVer"
Name: python-%{module}
-Version: 2.8.5
+Version: 2.9.0
Release: 1
License: BSD
Group: Libraries/Python
#Source0Download: https://pypi.org/simple/semantic-version/
Source0: https://files.pythonhosted.org/packages/source/s/semantic-version/%{module}-%{version}.tar.gz
-# Source0-md5: 76d7364def7ee487b6153d40b13de904
+# Source0-md5: 1c79ce65c87479473223a642d2cbc3c2
URL: https://pypi.org/project/semantic-version/
%if %{with python2}
BuildRequires: python-modules >= 1:2.7
BuildRequires: python-setuptools
+%if %{with nose}
+BuildRequires: python-nose
+%endif
%endif
%if %{with python3}
BuildRequires: python3-modules >= 1:3.4
BuildRequires: python3-setuptools
+%if %{with nose}
+BuildRequires: python3-nose
+%endif
%endif
BuildRequires: rpm-pythonprov
BuildRequires: rpmbuild(macros) >= 1.714
@@ -27,28 +39,63 @@ BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
-This small python library provides a few tools to handle SemVer in
+This small Python library provides a few tools to handle SemVer in
Python. It follows strictly the 2.0.0 version of the SemVer scheme.
+%description -l pl.UTF-8
+Ta mała biblioteka Pythona dostarcza kilka narzędzi do obsługi SemVer
+w Pythonie. Jest ściśle zgodna z wersją 2.0.0 schematu SemVer.
+
%package -n python3-%{module}
Summary: A library implementing the 'SemVer' scheme
+Summary(pl.UTF-8): Biblioteka implementująca schemat "SemVer"
Group: Libraries/Python
Requires: python3-modules >= 1:3.4
%description -n python3-%{module}
-This small python library provides a few tools to handle SemVer in
+This small Python library provides a few tools to handle SemVer in
Python. It follows strictly the 2.0.0 version of the SemVer scheme.
+%description -n python3-%{module} -l pl.UTF-8
+Ta mała biblioteka Pythona dostarcza kilka narzędzi do obsługi SemVer
+w Pythonie. Jest ściśle zgodna z wersją 2.0.0 schematu SemVer.
+
+%package apidocs
+Summary: API documentation for Python semantic_version module
+Summary(pl.UTF-8): Dokumentacja API modułu Pythona semantic_version
+Group: Documentation
+
+%description apidocs
+API documentation for Python semantic_version module.
+
+%description apidocs -l pl.UTF-8
+Dokumentacja API modułu Pythona semantic_version.
+
%prep
%setup -q -n %{module}-%{version}
%build
%if %{with python2}
%py_build
+
+%if %{with tests}
+PYTHONPATH=$(pwd) \
+nosetests-%{py_ver} tests
+%endif
%endif
%if %{with python3}
%py3_build
+
+%if %{with tests}
+PYTHONPATH=$(pwd) \
+nosetests-%{py3_ver} tests
+%endif
+%endif
+
+%if %{with doc}
+%{__make} -C docs html \
+ SPHINXBUILD=sphinx-build-2
%endif
%install
@@ -70,7 +117,7 @@ rm -rf $RPM_BUILD_ROOT
%if %{with python2}
%files
%defattr(644,root,root,755)
-%doc CREDITS ChangeLog README.rst
+%doc CREDITS ChangeLog LICENSE README.rst
%{py_sitescriptdir}/%{module}
%{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
%endif
@@ -78,7 +125,13 @@ rm -rf $RPM_BUILD_ROOT
%if %{with python3}
%files -n python3-%{module}
%defattr(644,root,root,755)
-%doc CREDITS ChangeLog README.rst
+%doc CREDITS ChangeLog LICENSE README.rst
%{py3_sitescriptdir}/%{module}
%{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
%endif
+
+%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/python-semantic_version.git/commitdiff/6054ec1ca72a28f0b129512311c69a6803396d6e
More information about the pld-cvs-commit
mailing list