]>
Commit | Line | Data |
---|---|---|
492d659a | 1 | # TODO: |
47bbc0f7 | 2 | # - packaging of |
492d659a MK |
3 | # /usr/bin/tox |
4 | # /usr/bin/tox-quickstart | |
a17b6a4a | 5 | # - fix tests on builders |
492d659a | 6 | |
492d659a | 7 | # Conditional build: |
492d659a MK |
8 | %bcond_without tests # do not perform "make test" |
9 | %bcond_without python2 # CPython 2.x module | |
10 | %bcond_without python3 # CPython 3.x module | |
11 | ||
83312487 | 12 | %define module tox |
492d659a MK |
13 | Summary: Virtualenv-based automation of test activities |
14 | Summary(pl.UTF-8): Oparta na Virtualenv automatyka testów | |
15 | Name: python-%{module} | |
ec3b4bc6 | 16 | Version: 3.23.0 |
0d7ecfe1 | 17 | Release: 4 |
492d659a MK |
18 | License: MIT |
19 | Group: Libraries/Python | |
83312487 | 20 | Source0: https://files.pythonhosted.org/packages/source/t/tox/tox-%{version}.tar.gz |
ec3b4bc6 | 21 | # Source0-md5: bd96f55bb0b50be9aec5bab6094a3eb1 |
9ccf3ca2 | 22 | Patch0: virtualenv.patch |
492d659a MK |
23 | URL: http://tox.testrun.org/ |
24 | BuildRequires: rpm-pythonprov | |
25 | BuildRequires: rpmbuild(macros) >= 1.714 | |
26 | %if %{with python2} | |
ec3b4bc6 AM |
27 | BuildRequires: python-filelock |
28 | BuildRequires: python-flaky | |
492d659a MK |
29 | BuildRequires: python-modules |
30 | BuildRequires: python-pluggy | |
31 | BuildRequires: python-virtualenv | |
ebc11277 MK |
32 | BuildRequires: python-pytest >= 2.3.5 |
33 | BuildRequires: python-pytest-timeout | |
9c8d9d57 | 34 | BuildRequires: python-py |
492d659a MK |
35 | %endif |
36 | %if %{with python3} | |
ec3b4bc6 AM |
37 | BuildRequires: python3-filelock |
38 | BuildRequires: python3-flaky | |
492d659a MK |
39 | BuildRequires: python3-modules |
40 | BuildRequires: python3-pluggy | |
41 | BuildRequires: python3-virtualenv | |
ebc11277 MK |
42 | BuildRequires: python3-pytest >= 2.3.5 |
43 | BuildRequires: python3-pytest-timeout | |
9c8d9d57 | 44 | BuildRequires: python3-py |
492d659a MK |
45 | %endif |
46 | Requires: python-modules | |
47 | BuildArch: noarch | |
48 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
49 | ||
50 | %description | |
47bbc0f7 ER |
51 | Tox is a generic virtualenv management and test command line tool you |
52 | can use for: | |
53 | - checking your package installs correctly with different Python | |
54 | versions and interpreters | |
55 | - running your tests in each of the environments, configuring your | |
56 | test tool of choice | |
57 | - acting as a frontend to Continuous Integration servers, greatly | |
58 | reducing boilerplate and merging CI and shell-based testing. | |
492d659a MK |
59 | |
60 | %description -l pl.UTF-8 | |
47bbc0f7 ER |
61 | Tox jest ogólnym, operatym na virtualenv narzędziem linii poleceń |
62 | które może być użyte do: | |
63 | - testowania czy pakiet instaluje się poprawnie z róznymi wersjami | |
64 | Pythona | |
65 | - uruchamionia testów dla każdego ze środowisk, konfigurując narzędzia | |
66 | testowe | |
67 | - jako frontend dla serwerów Continuous Integration, | |
492d659a MK |
68 | |
69 | %package -n python3-%{module} | |
70 | Summary: Virtualenv-based automation of test activities | |
71 | Summary(pl.UTF-8): Oparta na Virtualenv automatyka testów | |
72 | Group: Libraries/Python | |
73 | Requires: python3-modules | |
74 | ||
75 | %description -n python3-%{module} | |
47bbc0f7 ER |
76 | Tox is a generic virtualenv management and test command line tool you |
77 | can use for: | |
78 | - checking your package installs correctly with different Python | |
79 | versions and interpreters | |
80 | - running your tests in each of the environments, configuring your | |
81 | test tool of choice | |
82 | - acting as a frontend to Continuous Integration servers, greatly | |
83 | reducing boilerplate and merging CI and shell-based testing. | |
492d659a MK |
84 | |
85 | %description -n python3-%{module} -l pl.UTF-8 | |
47bbc0f7 ER |
86 | Tox jest ogólnym, operatym na virtualenv narzędziem linii poleceń |
87 | które może być użyte do: | |
88 | - testowania czy pakiet instaluje się poprawnie z róznymi wersjami | |
89 | Pythona | |
90 | - uruchamionia testów dla każdego ze środowisk, konfigurując narzędzia | |
91 | testowe | |
92 | - jako frontend dla serwerów Continuous Integration, | |
492d659a MK |
93 | |
94 | %package apidocs | |
95 | Summary: %{module} API documentation | |
96 | Summary(pl.UTF-8): Dokumentacja API %{module} | |
97 | Group: Documentation | |
98 | ||
99 | %description apidocs | |
100 | API documentation for %{module}. | |
101 | ||
102 | %description apidocs -l pl.UTF-8 | |
103 | Dokumentacja API %{module}. | |
104 | ||
105 | %prep | |
106 | %setup -q -n %{module}-%{version} | |
9ccf3ca2 | 107 | %patch0 -p1 |
492d659a MK |
108 | |
109 | %build | |
110 | %if %{with python2} | |
111 | %py_build %{?with_tests:test} | |
112 | %endif | |
113 | ||
114 | %if %{with python3} | |
115 | %py3_build %{?with_tests:test} | |
116 | %endif | |
117 | ||
118 | %if %{with doc} | |
119 | cd docs | |
120 | %{__make} -j1 html | |
121 | rm -rf _build/html/_sources | |
122 | %endif | |
123 | ||
124 | %install | |
125 | rm -rf $RPM_BUILD_ROOT | |
492d659a MK |
126 | %if %{with python2} |
127 | %py_install | |
492d659a MK |
128 | %py_postclean |
129 | %endif | |
130 | ||
131 | %if %{with python3} | |
132 | %py3_install | |
133 | %endif | |
134 | ||
135 | %clean | |
136 | rm -rf $RPM_BUILD_ROOT | |
137 | ||
138 | %if %{with python2} | |
139 | %files | |
140 | %defattr(644,root,root,755) | |
ec3b4bc6 | 141 | %doc CONTRIBUTORS README.md |
492d659a | 142 | %{py_sitescriptdir}/%{module} |
492d659a MK |
143 | %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info |
144 | %endif | |
492d659a MK |
145 | |
146 | %if %{with python3} | |
147 | %files -n python3-%{module} | |
148 | %defattr(644,root,root,755) | |
ec3b4bc6 AM |
149 | %doc CONTRIBUTORS README.md |
150 | %attr(755,root,root) %{_bindir}/tox | |
151 | %attr(755,root,root) %{_bindir}/tox-quickstart | |
492d659a MK |
152 | %{py3_sitescriptdir}/%{module} |
153 | %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info | |
154 | %endif | |
155 | ||
156 | %if %{with doc} | |
157 | %files apidocs | |
158 | %defattr(644,root,root,755) | |
159 | %doc docs/_build/html/* | |
160 | %endif |