]> git.pld-linux.org Git - packages/python-semantic_version.git/blob - python-semantic_version.spec
- updated to 2.9.0, added tests and apidocs
[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:        1
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 Requires:       python-modules >= 1:2.7
38 BuildArch:      noarch
39 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
40
41 %description
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.
44
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.
48
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
54
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.
58
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.
62
63 %package apidocs
64 Summary:        API documentation for Python semantic_version module
65 Summary(pl.UTF-8):      Dokumentacja API modułu Pythona semantic_version
66 Group:          Documentation
67
68 %description apidocs
69 API documentation for Python semantic_version module.
70
71 %description apidocs -l pl.UTF-8
72 Dokumentacja API modułu Pythona semantic_version.
73
74 %prep
75 %setup -q -n %{module}-%{version}
76
77 %build
78 %if %{with python2}
79 %py_build
80
81 %if %{with tests}
82 PYTHONPATH=$(pwd) \
83 nosetests-%{py_ver} tests
84 %endif
85 %endif
86
87 %if %{with python3}
88 %py3_build
89
90 %if %{with tests}
91 PYTHONPATH=$(pwd) \
92 nosetests-%{py3_ver} tests
93 %endif
94 %endif
95
96 %if %{with doc}
97 %{__make} -C docs html \
98         SPHINXBUILD=sphinx-build-2
99 %endif
100
101 %install
102 rm -rf $RPM_BUILD_ROOT
103
104 %if %{with python2}
105 %py_install
106
107 %py_postclean
108 %endif
109
110 %if %{with python3}
111 %py3_install
112 %endif
113
114 %clean
115 rm -rf $RPM_BUILD_ROOT
116
117 %if %{with python2}
118 %files
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
123 %endif
124
125 %if %{with python3}
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
131 %endif
132
133 %if %{with doc}
134 %files apidocs
135 %defattr(644,root,root,755)
136 %doc docs/_build/html/{_static,*.html,*.js}
137 %endif
This page took 0.094356 seconds and 3 git commands to generate.