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
37 Requires: python-modules >= 1:2.7
39 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42 This small Python library provides a few tools to handle SemVer in
43 Python. It follows strictly the 2.0.0 version of the SemVer scheme.
45 %description -l pl.UTF-8
46 Ta mała biblioteka Pythona dostarcza kilka narzędzi do obsługi SemVer
47 w Pythonie. Jest ściśle zgodna z wersją 2.0.0 schematu SemVer.
49 %package -n python3-%{module}
50 Summary: A library implementing the 'SemVer' scheme
51 Summary(pl.UTF-8): Biblioteka implementująca schemat "SemVer"
52 Group: Libraries/Python
53 Requires: python3-modules >= 1:3.4
55 %description -n python3-%{module}
56 This small Python library provides a few tools to handle SemVer in
57 Python. It follows strictly the 2.0.0 version of the SemVer scheme.
59 %description -n python3-%{module} -l pl.UTF-8
60 Ta mała biblioteka Pythona dostarcza kilka narzędzi do obsługi SemVer
61 w Pythonie. Jest ściśle zgodna z wersją 2.0.0 schematu SemVer.
64 Summary: API documentation for Python semantic_version module
65 Summary(pl.UTF-8): Dokumentacja API modułu Pythona semantic_version
69 API documentation for Python semantic_version module.
71 %description apidocs -l pl.UTF-8
72 Dokumentacja API modułu Pythona semantic_version.
75 %setup -q -n %{module}-%{version}
83 nosetests-%{py_ver} tests
92 nosetests-%{py3_ver} tests
97 %{__make} -C docs html \
98 SPHINXBUILD=sphinx-build-2
102 rm -rf $RPM_BUILD_ROOT
115 rm -rf $RPM_BUILD_ROOT
119 %defattr(644,root,root,755)
120 %doc CREDITS ChangeLog LICENSE README.rst
121 %{py_sitescriptdir}/%{module}
122 %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
126 %files -n python3-%{module}
127 %defattr(644,root,root,755)
128 %doc CREDITS ChangeLog LICENSE README.rst
129 %{py3_sitescriptdir}/%{module}
130 %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
135 %defattr(644,root,root,755)
136 %doc docs/_build/html/{_static,*.html,*.js}