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