1 %bcond_without python2 # CPython 2.x module
2 %bcond_without python3 # CPython 3.x module
4 %define module semantic_version
5 Summary: A library implementing the 'SemVer' scheme
10 Group: Libraries/Python
11 #Source0Download: https://pypi.org/simple/semantic-version/
12 Source0: https://files.pythonhosted.org/packages/source/s/semantic-version/%{module}-%{version}.tar.gz
13 # Source0-md5: 76d7364def7ee487b6153d40b13de904
14 URL: https://pypi.org/project/semantic-version/
16 BuildRequires: python-modules >= 1:2.7
17 BuildRequires: python-setuptools
20 BuildRequires: python3-modules >= 1:3.4
21 BuildRequires: python3-setuptools
23 BuildRequires: rpm-pythonprov
24 BuildRequires: rpmbuild(macros) >= 1.714
25 Requires: python-modules >= 1:2.7
27 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30 This small python library provides a few tools to handle SemVer in
31 Python. It follows strictly the 2.0.0 version of the SemVer scheme.
33 %package -n python3-%{module}
34 Summary: A library implementing the 'SemVer' scheme
35 Group: Libraries/Python
36 Requires: python3-modules >= 1:3.4
38 %description -n python3-%{module}
39 This small python library provides a few tools to handle SemVer in
40 Python. It follows strictly the 2.0.0 version of the SemVer scheme.
43 %setup -q -n %{module}-%{version}
55 rm -rf $RPM_BUILD_ROOT
68 rm -rf $RPM_BUILD_ROOT
72 %defattr(644,root,root,755)
73 %doc CREDITS ChangeLog README.rst
74 %{py_sitescriptdir}/%{module}
75 %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
79 %files -n python3-%{module}
80 %defattr(644,root,root,755)
81 %doc CREDITS ChangeLog README.rst
82 %{py3_sitescriptdir}/%{module}
83 %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info