]>
Commit | Line | Data |
---|---|---|
44fd9df5 JB |
1 | # |
2 | # Conditional build: | |
5d6d3666 | 3 | %bcond_without tests # unit tests [py3 tests fail with sphinx3.x+docutils0.18 combo] |
44fd9df5 JB |
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 | |
5d6d3666 | 17 | Patch0: %{name}-noconf.patch |
44fd9df5 JB |
18 | URL: https://pypi.org/project/sphinxtesters/ |
19 | %if %{with python2} | |
20 | BuildRequires: python-modules >= 1:2.7 | |
21 | BuildRequires: python-setuptools | |
22 | %if %{with tests} | |
23 | BuildRequires: python-Sphinx >= 1.4 | |
24 | BuildRequires: python-pytest | |
25 | %endif | |
26 | %endif | |
27 | %if %{with python3} | |
28 | BuildRequires: python3-modules >= 1:3.3 | |
29 | BuildRequires: python3-setuptools | |
30 | %if %{with tests} | |
31 | BuildRequires: python3-Sphinx >= 1.4 | |
32 | BuildRequires: python3-pytest | |
33 | %endif | |
34 | %endif | |
35 | BuildRequires: rpm-pythonprov | |
36 | BuildRequires: rpmbuild(macros) >= 1.714 | |
37 | Requires: python-Sphinx >= 1.4 | |
38 | Requires: python-modules >= 1:2.7 | |
39 | BuildArch: noarch | |
40 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
41 | ||
42 | %description | |
43 | Utilities for testing Sphinx extensions. | |
44 | ||
45 | %description -l pl.UTF-8 | |
46 | Narzędzia do testowania rozszerzeń Sphinksa. | |
47 | ||
48 | %package -n python3-sphinxtesters | |
49 | Summary: Utilities for testing Sphinx extensions | |
50 | Summary(pl.UTF-8): Narzędzia do testowania rozszerzeń Sphinksa | |
51 | Group: Libraries/Python | |
52 | Requires: python3-Sphinx >= 1.4 | |
53 | Requires: python3-modules >= 1:3.3 | |
54 | ||
55 | %description -n python3-sphinxtesters | |
56 | Utilities for testing Sphinx extensions. | |
57 | ||
58 | %description -n python3-sphinxtesters -l pl.UTF-8 | |
59 | Narzędzia do testowania rozszerzeń Sphinksa. | |
60 | ||
61 | %prep | |
62 | %setup -q -n sphinxtesters-%{version} | |
5d6d3666 | 63 | %patch0 -p1 |
44fd9df5 JB |
64 | |
65 | %build | |
66 | %if %{with python2} | |
67 | %py_build | |
68 | ||
5d6d3666 JB |
69 | %if %{with tests} |
70 | PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \ | |
71 | %{__python} -m pytest sphinxtesters/tests | |
72 | %endif | |
44fd9df5 JB |
73 | %endif |
74 | ||
75 | %if %{with python3} | |
76 | %py3_build | |
77 | ||
5d6d3666 JB |
78 | %if %{with tests} |
79 | PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \ | |
80 | %{__python3} -m pytest sphinxtesters/tests | |
81 | %endif | |
44fd9df5 JB |
82 | %endif |
83 | ||
84 | %install | |
85 | rm -rf $RPM_BUILD_ROOT | |
86 | ||
87 | %if %{with python2} | |
88 | %py_install | |
89 | ||
90 | %py_postclean | |
91 | %endif | |
92 | ||
93 | %if %{with python3} | |
94 | %py3_install | |
95 | %endif | |
96 | ||
97 | %clean | |
98 | rm -rf $RPM_BUILD_ROOT | |
99 | ||
100 | %if %{with python2} | |
101 | %files | |
102 | %defattr(644,root,root,755) | |
103 | %doc LICENSE README.rst | |
104 | %{py_sitescriptdir}/sphinxtesters | |
105 | %{py_sitescriptdir}/sphinxtesters-%{version}-py*.egg-info | |
106 | %endif | |
107 | ||
108 | %if %{with python3} | |
109 | %files -n python3-sphinxtesters | |
110 | %defattr(644,root,root,755) | |
111 | %doc LICENSE README.rst | |
112 | %{py3_sitescriptdir}/sphinxtesters | |
113 | %{py3_sitescriptdir}/sphinxtesters-%{version}-py*.egg-info | |
114 | %endif |