1 # TODO: run tests using nose2 instead of nose (following upstream)
4 %bcond_without doc # Sphinx documentation
5 %bcond_without tests # unit tests
6 %bcond_without python2 # CPython 2.x module
7 %bcond_without python3 # CPython 3.x module
9 %define module semantic_version
10 Summary: A library implementing the 'SemVer' scheme
11 Summary(pl.UTF-8): Biblioteka implementująca schemat "SemVer"
12 Name: python-%{module}
16 Group: Libraries/Python
17 #Source0Download: https://pypi.org/simple/semantic-version/
18 Source0: https://files.pythonhosted.org/packages/source/s/semantic-version/%{module}-%{version}.tar.gz
19 # Source0-md5: 1c79ce65c87479473223a642d2cbc3c2
20 URL: https://pypi.org/project/semantic-version/
22 BuildRequires: python-modules >= 1:2.7
23 BuildRequires: python-setuptools
25 BuildRequires: python-nose
29 BuildRequires: python3-modules >= 1:3.4
30 BuildRequires: python3-setuptools
32 BuildRequires: python3-nose
35 BuildRequires: rpm-pythonprov
36 BuildRequires: rpmbuild(macros) >= 1.714
38 BuildRequires: python3-sphinx_rtd_theme
39 BuildRequires: sphinx-pdg-3
41 Requires: python-modules >= 1:2.7
43 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
46 This small Python library provides a few tools to handle SemVer in
47 Python. It follows strictly the 2.0.0 version of the SemVer scheme.
49 %description -l pl.UTF-8
50 Ta mała biblioteka Pythona dostarcza kilka narzędzi do obsługi SemVer
51 w Pythonie. Jest ściśle zgodna z wersją 2.0.0 schematu SemVer.
53 %package -n python3-%{module}
54 Summary: A library implementing the 'SemVer' scheme
55 Summary(pl.UTF-8): Biblioteka implementująca schemat "SemVer"
56 Group: Libraries/Python
57 Requires: python3-modules >= 1:3.4
59 %description -n python3-%{module}
60 This small Python library provides a few tools to handle SemVer in
61 Python. It follows strictly the 2.0.0 version of the SemVer scheme.
63 %description -n python3-%{module} -l pl.UTF-8
64 Ta mała biblioteka Pythona dostarcza kilka narzędzi do obsługi SemVer
65 w Pythonie. Jest ściśle zgodna z wersją 2.0.0 schematu SemVer.
68 Summary: API documentation for Python semantic_version module
69 Summary(pl.UTF-8): Dokumentacja API modułu Pythona semantic_version
73 API documentation for Python semantic_version module.
75 %description apidocs -l pl.UTF-8
76 Dokumentacja API modułu Pythona semantic_version.
79 %setup -q -n %{module}-%{version}
87 nosetests-%{py_ver} tests
96 nosetests-%{py3_ver} tests
101 %{__make} -C docs html \
102 SPHINXBUILD=sphinx-build-3
106 rm -rf $RPM_BUILD_ROOT
119 rm -rf $RPM_BUILD_ROOT
123 %defattr(644,root,root,755)
124 %doc CREDITS ChangeLog LICENSE README.rst
125 %{py_sitescriptdir}/%{module}
126 %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
130 %files -n python3-%{module}
131 %defattr(644,root,root,755)
132 %doc CREDITS ChangeLog LICENSE README.rst
133 %{py3_sitescriptdir}/%{module}
134 %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
139 %defattr(644,root,root,755)
140 %doc docs/_build/html/{_static,*.html,*.js}