]> git.pld-linux.org Git - packages/python-semantic_version.git/commitdiff
- updated to 2.9.0, added tests and apidocs
authorJakub Bogusz <qboosh@pld-linux.org>
Tue, 8 Mar 2022 20:15:21 +0000 (21:15 +0100)
committerJakub Bogusz <qboosh@pld-linux.org>
Tue, 8 Mar 2022 20:15:21 +0000 (21:15 +0100)
python-semantic_version.spec

index 53294d4edffe169cf5575483d94128bb62a10c1a..0a20f70e9fe782fc775d8d16d35e6a49a43ccb70 100644 (file)
@@ -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
This page took 0.152421 seconds and 4 git commands to generate.