]>
Commit | Line | Data |
---|---|---|
d7869a78 JB |
1 | # |
2 | # Conditional build: | |
bc624dc4 JB |
3 | %bcond_without python2 # CPython 2.x module |
4 | %bcond_without python3 # CPython 3.x module | |
4012ddb3 | 5 | %bcond_with tests # tests [sensitive to pytest warnings or other output changes, ptys needed] |
d7869a78 JB |
6 | |
7 | Summary: py.test distributed testing plugin | |
8 | Summary(pl.UTF-8): Wtyczka py.test do testów rozproszonych | |
9 | Name: python-pytest-xdist | |
6b14b975 JB |
10 | # keep 1.x here for python2 support |
11 | Version: 1.34.0 | |
7efda17c | 12 | Release: 2 |
d7869a78 JB |
13 | License: MIT |
14 | Group: Libraries/Python | |
22462ed1 | 15 | #Source0Download: https://pypi.org/simple/pytest-xdist/ |
d7869a78 | 16 | Source0: https://files.pythonhosted.org/packages/source/p/pytest-xdist/pytest-xdist-%{version}.tar.gz |
6b14b975 | 17 | # Source0-md5: 23bcf5f0c6f1f84edced37d04b721281 |
d7869a78 JB |
18 | URL: https://github.com/pytest-dev/pytest-xdist |
19 | %if %{with python2} | |
22462ed1 | 20 | BuildRequires: python-modules >= 1:2.7 |
d7869a78 JB |
21 | BuildRequires: python-setuptools |
22 | BuildRequires: python-setuptools_scm | |
f06c25ac | 23 | %if %{with tests} |
d7869a78 | 24 | BuildRequires: python-execnet >= 1.1 |
0ce966ae | 25 | BuildRequires: python-filelock |
d7869a78 | 26 | BuildRequires: python-py >= 1.4.22 |
6b14b975 | 27 | BuildRequires: python-pytest >= 4.4.0 |
22462ed1 | 28 | BuildRequires: python-pytest-forked |
0ce966ae | 29 | BuildRequires: python-six |
bc624dc4 | 30 | BuildConflicts: python-pytest-capturelog |
d7869a78 JB |
31 | %endif |
32 | %endif | |
33 | %if %{with python3} | |
6b14b975 | 34 | BuildRequires: python3-modules >= 1:3.5 |
d7869a78 JB |
35 | BuildRequires: python3-setuptools |
36 | BuildRequires: python3-setuptools_scm | |
37 | %if %{with tests} | |
38 | BuildRequires: python3-execnet >= 1.1 | |
0ce966ae | 39 | BuildRequires: python3-filelock |
d7869a78 | 40 | BuildRequires: python3-py >= 1.4.22 |
6b14b975 | 41 | BuildRequires: python3-pytest >= 4.4.0 |
22462ed1 | 42 | BuildRequires: python3-pytest-forked |
0ce966ae | 43 | BuildRequires: python3-six |
bc624dc4 | 44 | BuildConflicts: python-pytest-capturelog |
d7869a78 JB |
45 | %endif |
46 | %endif | |
47 | BuildRequires: rpm-pythonprov | |
48 | BuildRequires: rpmbuild(macros) >= 1.714 | |
22462ed1 | 49 | Requires: python-modules >= 1:2.7 |
d7869a78 JB |
50 | BuildArch: noarch |
51 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
52 | ||
53 | %description | |
54 | The pytest-xdist plugin extends py.test with some unique test | |
55 | execution modes, like parallelization. | |
56 | ||
57 | %description -l pl.UTF-8 | |
58 | Wtyczka pytest-xdist rozszerza py.test o kilka unikatowych | |
59 | trybów wykonywania testów, jak choćby zrównoleglenie. | |
60 | ||
61 | %package -n python3-pytest-xdist | |
62 | Summary: py.test distributed testing plugin | |
63 | Summary(pl.UTF-8): Wtyczka py.test do testów rozproszonych | |
64 | Group: Libraries/Python | |
6b14b975 | 65 | Requires: python3-modules >= 1:3.5 |
d7869a78 JB |
66 | |
67 | %description -n python3-pytest-xdist | |
68 | The pytest-xdist plugin extends py.test with some unique test | |
69 | execution modes, like parallelization. | |
70 | ||
71 | %description -n python3-pytest-xdist -l pl.UTF-8 | |
72 | Wtyczka pytest-xdist rozszerza py.test o kilka unikatowych | |
73 | trybów wykonywania testów, jak choćby zrównoleglenie. | |
74 | ||
75 | %prep | |
76 | %setup -q -n pytest-xdist-%{version} | |
d7869a78 JB |
77 | |
78 | %build | |
79 | %if %{with python2} | |
80 | %py_build | |
81 | ||
f06c25ac | 82 | %if %{with tests} |
e321c63e | 83 | # -p no:benchmark to avoid "PytestBenchmarkWarning: Benchmarks are automatically disabled because xdist plugin is active.Benchmarks" |
22462ed1 | 84 | PYTHONPATH=$(pwd) \ |
4012ddb3 | 85 | %{__python} -m pytest -p no:benchmark testing |
d7869a78 JB |
86 | %endif |
87 | %endif | |
88 | ||
89 | %if %{with python3} | |
90 | %py3_build | |
91 | ||
92 | %if %{with tests} | |
22462ed1 | 93 | PYTHONPATH=$(pwd) \ |
4012ddb3 | 94 | %{__python3} -m pytest -p no:benchmark testing |
d7869a78 JB |
95 | %endif |
96 | %endif | |
97 | ||
98 | %install | |
99 | rm -rf $RPM_BUILD_ROOT | |
100 | ||
101 | %if %{with python2} | |
102 | %py_install | |
103 | ||
104 | %py_postclean | |
105 | %endif | |
106 | ||
107 | %if %{with python3} | |
108 | %py3_install | |
109 | %endif | |
110 | ||
111 | %clean | |
112 | rm -rf $RPM_BUILD_ROOT | |
113 | ||
114 | %if %{with python2} | |
115 | %files | |
116 | %defattr(644,root,root,755) | |
22462ed1 | 117 | %doc CHANGELOG.rst ISSUES.txt LICENSE OVERVIEW.md README.rst example/boxed.txt |
d7869a78 JB |
118 | %{py_sitescriptdir}/xdist |
119 | %{py_sitescriptdir}/pytest_xdist-%{version}-py*.egg-info | |
120 | %endif | |
121 | ||
122 | %if %{with python3} | |
123 | %files -n python3-pytest-xdist | |
124 | %defattr(644,root,root,755) | |
22462ed1 | 125 | %doc CHANGELOG.rst ISSUES.txt LICENSE OVERVIEW.md README.rst example/boxed.txt |
d7869a78 JB |
126 | %{py3_sitescriptdir}/xdist |
127 | %{py3_sitescriptdir}/pytest_xdist-%{version}-py*.egg-info | |
128 | %endif |