]>
Commit | Line | Data |
---|---|---|
44fd9df5 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # unit tests | |
4 | %bcond_without python2 # CPython 2.x module | |
5 | %bcond_without python3 # CPython 3.x module | |
6 | ||
7 | Summary: Utilities for testing Sphinx extensions | |
8 | Summary(pl.UTF-8): Narzędzia do testowania rozszerzeń Sphinksa | |
9 | Name: python-sphinxtesters | |
10 | Version: 0.2.3 | |
095e8b06 | 11 | Release: 4 |
44fd9df5 JB |
12 | License: BSD |
13 | Group: Libraries/Python | |
14 | #Source0Download: https://pypi.org/simple/sphinxtesters/ | |
15 | Source0: https://files.pythonhosted.org/packages/source/s/sphinxtesters/sphinxtesters-%{version}.tar.gz | |
16 | # Source0-md5: 3df3720ba757d3d8270fed5aff622852 | |
17 | URL: https://pypi.org/project/sphinxtesters/ | |
18 | %if %{with python2} | |
19 | BuildRequires: python-modules >= 1:2.7 | |
20 | BuildRequires: python-setuptools | |
21 | %if %{with tests} | |
22 | BuildRequires: python-Sphinx >= 1.4 | |
23 | BuildRequires: python-pytest | |
24 | %endif | |
25 | %endif | |
26 | %if %{with python3} | |
27 | BuildRequires: python3-modules >= 1:3.3 | |
28 | BuildRequires: python3-setuptools | |
29 | %if %{with tests} | |
30 | BuildRequires: python3-Sphinx >= 1.4 | |
31 | BuildRequires: python3-pytest | |
32 | %endif | |
33 | %endif | |
34 | BuildRequires: rpm-pythonprov | |
35 | BuildRequires: rpmbuild(macros) >= 1.714 | |
36 | Requires: python-Sphinx >= 1.4 | |
37 | Requires: python-modules >= 1:2.7 | |
38 | BuildArch: noarch | |
39 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
40 | ||
41 | %description | |
42 | Utilities for testing Sphinx extensions. | |
43 | ||
44 | %description -l pl.UTF-8 | |
45 | Narzędzia do testowania rozszerzeń Sphinksa. | |
46 | ||
47 | %package -n python3-sphinxtesters | |
48 | Summary: Utilities for testing Sphinx extensions | |
49 | Summary(pl.UTF-8): Narzędzia do testowania rozszerzeń Sphinksa | |
50 | Group: Libraries/Python | |
51 | Requires: python3-Sphinx >= 1.4 | |
52 | Requires: python3-modules >= 1:3.3 | |
53 | ||
54 | %description -n python3-sphinxtesters | |
55 | Utilities for testing Sphinx extensions. | |
56 | ||
57 | %description -n python3-sphinxtesters -l pl.UTF-8 | |
58 | Narzędzia do testowania rozszerzeń Sphinksa. | |
59 | ||
60 | %prep | |
61 | %setup -q -n sphinxtesters-%{version} | |
62 | ||
63 | %build | |
64 | %if %{with python2} | |
65 | %py_build | |
66 | ||
67 | %{?with_tests:%{__python} -m pytest sphinxtesters/tests} | |
68 | %endif | |
69 | ||
70 | %if %{with python3} | |
71 | %py3_build | |
72 | ||
73 | %{?with_tests:%{__python3} -m pytest sphinxtesters/tests} | |
74 | %endif | |
75 | ||
76 | %install | |
77 | rm -rf $RPM_BUILD_ROOT | |
78 | ||
79 | %if %{with python2} | |
80 | %py_install | |
81 | ||
82 | %py_postclean | |
83 | %endif | |
84 | ||
85 | %if %{with python3} | |
86 | %py3_install | |
87 | %endif | |
88 | ||
89 | %clean | |
90 | rm -rf $RPM_BUILD_ROOT | |
91 | ||
92 | %if %{with python2} | |
93 | %files | |
94 | %defattr(644,root,root,755) | |
95 | %doc LICENSE README.rst | |
96 | %{py_sitescriptdir}/sphinxtesters | |
97 | %{py_sitescriptdir}/sphinxtesters-%{version}-py*.egg-info | |
98 | %endif | |
99 | ||
100 | %if %{with python3} | |
101 | %files -n python3-sphinxtesters | |
102 | %defattr(644,root,root,755) | |
103 | %doc LICENSE README.rst | |
104 | %{py3_sitescriptdir}/sphinxtesters | |
105 | %{py3_sitescriptdir}/sphinxtesters-%{version}-py*.egg-info | |
106 | %endif |