]> git.pld-linux.org Git - packages/python-semantic_version.git/blame - python-semantic_version.spec
rebuild with python 3.10
[packages/python-semantic_version.git] / python-semantic_version.spec
CommitLineData
6054ec1c
JB
1# TODO: run tests using nose2 instead of nose (following upstream)
2#
3# Conditional build:
4%bcond_without doc # Sphinx documentation
5%bcond_without tests # unit tests
ef549ff4
JP
6%bcond_without python2 # CPython 2.x module
7%bcond_without python3 # CPython 3.x module
8
9%define module semantic_version
10Summary: A library implementing the 'SemVer' scheme
6054ec1c 11Summary(pl.UTF-8): Biblioteka implementująca schemat "SemVer"
ef549ff4 12Name: python-%{module}
6054ec1c 13Version: 2.9.0
b2e7d558 14Release: 2
ef549ff4
JP
15License: BSD
16Group: Libraries/Python
17#Source0Download: https://pypi.org/simple/semantic-version/
18Source0: https://files.pythonhosted.org/packages/source/s/semantic-version/%{module}-%{version}.tar.gz
6054ec1c 19# Source0-md5: 1c79ce65c87479473223a642d2cbc3c2
ef549ff4
JP
20URL: https://pypi.org/project/semantic-version/
21%if %{with python2}
22BuildRequires: python-modules >= 1:2.7
23BuildRequires: python-setuptools
6054ec1c
JB
24%if %{with nose}
25BuildRequires: python-nose
26%endif
ef549ff4
JP
27%endif
28%if %{with python3}
29BuildRequires: python3-modules >= 1:3.4
30BuildRequires: python3-setuptools
6054ec1c
JB
31%if %{with nose}
32BuildRequires: python3-nose
33%endif
ef549ff4
JP
34%endif
35BuildRequires: rpm-pythonprov
36BuildRequires: rpmbuild(macros) >= 1.714
9e83c846
JB
37%if %{with doc}
38BuildRequires: python3-sphinx_rtd_theme
39BuildRequires: sphinx-pdg-3
40%endif
ef549ff4
JP
41Requires: python-modules >= 1:2.7
42BuildArch: noarch
43BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
44
45%description
6054ec1c 46This small Python library provides a few tools to handle SemVer in
ef549ff4
JP
47Python. It follows strictly the 2.0.0 version of the SemVer scheme.
48
6054ec1c
JB
49%description -l pl.UTF-8
50Ta mała biblioteka Pythona dostarcza kilka narzędzi do obsługi SemVer
51w Pythonie. Jest ściśle zgodna z wersją 2.0.0 schematu SemVer.
52
ef549ff4
JP
53%package -n python3-%{module}
54Summary: A library implementing the 'SemVer' scheme
6054ec1c 55Summary(pl.UTF-8): Biblioteka implementująca schemat "SemVer"
ef549ff4
JP
56Group: Libraries/Python
57Requires: python3-modules >= 1:3.4
58
59%description -n python3-%{module}
6054ec1c 60This small Python library provides a few tools to handle SemVer in
ef549ff4
JP
61Python. It follows strictly the 2.0.0 version of the SemVer scheme.
62
6054ec1c
JB
63%description -n python3-%{module} -l pl.UTF-8
64Ta mała biblioteka Pythona dostarcza kilka narzędzi do obsługi SemVer
65w Pythonie. Jest ściśle zgodna z wersją 2.0.0 schematu SemVer.
66
67%package apidocs
68Summary: API documentation for Python semantic_version module
69Summary(pl.UTF-8): Dokumentacja API modułu Pythona semantic_version
70Group: Documentation
71
72%description apidocs
73API documentation for Python semantic_version module.
74
75%description apidocs -l pl.UTF-8
76Dokumentacja API modułu Pythona semantic_version.
77
ef549ff4
JP
78%prep
79%setup -q -n %{module}-%{version}
80
81%build
82%if %{with python2}
83%py_build
6054ec1c
JB
84
85%if %{with tests}
86PYTHONPATH=$(pwd) \
87nosetests-%{py_ver} tests
88%endif
ef549ff4
JP
89%endif
90
91%if %{with python3}
92%py3_build
6054ec1c
JB
93
94%if %{with tests}
95PYTHONPATH=$(pwd) \
96nosetests-%{py3_ver} tests
97%endif
98%endif
99
100%if %{with doc}
101%{__make} -C docs html \
9e83c846 102 SPHINXBUILD=sphinx-build-3
ef549ff4
JP
103%endif
104
105%install
106rm -rf $RPM_BUILD_ROOT
107
108%if %{with python2}
109%py_install
110
111%py_postclean
112%endif
113
114%if %{with python3}
115%py3_install
116%endif
117
118%clean
119rm -rf $RPM_BUILD_ROOT
120
121%if %{with python2}
122%files
123%defattr(644,root,root,755)
6054ec1c 124%doc CREDITS ChangeLog LICENSE README.rst
ef549ff4
JP
125%{py_sitescriptdir}/%{module}
126%{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
127%endif
128
129%if %{with python3}
130%files -n python3-%{module}
131%defattr(644,root,root,755)
6054ec1c 132%doc CREDITS ChangeLog LICENSE README.rst
ef549ff4
JP
133%{py3_sitescriptdir}/%{module}
134%{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
135%endif
6054ec1c
JB
136
137%if %{with doc}
138%files apidocs
139%defattr(644,root,root,755)
140%doc docs/_build/html/{_static,*.html,*.js}
141%endif
This page took 0.080261 seconds and 4 git commands to generate.