]> git.pld-linux.org Git - packages/python-semantic_version.git/blob - python-semantic_version.spec
595351a9f3b9491a0463c19da7a4f9686a5d06ed
[packages/python-semantic_version.git] / python-semantic_version.spec
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
6 %bcond_without  python2 # CPython 2.x module
7 %bcond_without  python3 # CPython 3.x module
8
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}
13 Version:        2.9.0
14 Release:        3
15 License:        BSD
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/
21 %if %{with python2}
22 BuildRequires:  python-modules >= 1:2.7
23 BuildRequires:  python-setuptools
24 %if %{with nose}
25 BuildRequires:  python-nose
26 %endif
27 %endif
28 %if %{with python3}
29 BuildRequires:  python3-modules >= 1:3.4
30 BuildRequires:  python3-setuptools
31 %if %{with nose}
32 BuildRequires:  python3-nose
33 %endif
34 %endif
35 BuildRequires:  rpm-pythonprov
36 BuildRequires:  rpmbuild(macros) >= 1.714
37 %if %{with doc}
38 BuildRequires:  python3-sphinx_rtd_theme
39 BuildRequires:  sphinx-pdg-3
40 %endif
41 Requires:       python-modules >= 1:2.7
42 BuildArch:      noarch
43 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
44
45 %description
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.
48
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.
52
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
58
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.
62
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.
66
67 %package apidocs
68 Summary:        API documentation for Python semantic_version module
69 Summary(pl.UTF-8):      Dokumentacja API modułu Pythona semantic_version
70 Group:          Documentation
71
72 %description apidocs
73 API documentation for Python semantic_version module.
74
75 %description apidocs -l pl.UTF-8
76 Dokumentacja API modułu Pythona semantic_version.
77
78 %prep
79 %setup -q -n %{module}-%{version}
80
81 %build
82 %if %{with python2}
83 %py_build
84
85 %if %{with tests}
86 PYTHONPATH=$(pwd) \
87 nosetests-%{py_ver} tests
88 %endif
89 %endif
90
91 %if %{with python3}
92 %py3_build
93
94 %if %{with tests}
95 PYTHONPATH=$(pwd) \
96 nosetests-%{py3_ver} tests
97 %endif
98 %endif
99
100 %if %{with doc}
101 %{__make} -C docs html \
102         SPHINXBUILD=sphinx-build-3
103 %endif
104
105 %install
106 rm -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
119 rm -rf $RPM_BUILD_ROOT
120
121 %if %{with python2}
122 %files
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
127 %endif
128
129 %if %{with python3}
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
135 %endif
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.129458 seconds and 2 git commands to generate.