]> git.pld-linux.org Git - packages/python-pytest-xdist.git/blob - python-pytest-xdist.spec
d879f1bda50ad7c6a6b59762b0ba649691028846
[packages/python-pytest-xdist.git] / python-pytest-xdist.spec
1 #
2 # Conditional build:
3 %bcond_without  python2         # CPython 2.x module
4 %bcond_without  python3         # CPython 3.x module
5 %bcond_with     tests           # tests [sensitive to pytest warnings or other output changes, ptys needed]
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
10 # keep 1.x here for python2 support
11 Version:        1.34.0
12 Release:        1
13 License:        MIT
14 Group:          Libraries/Python
15 #Source0Download: https://pypi.org/simple/pytest-xdist/
16 Source0:        https://files.pythonhosted.org/packages/source/p/pytest-xdist/pytest-xdist-%{version}.tar.gz
17 # Source0-md5:  23bcf5f0c6f1f84edced37d04b721281
18 URL:            https://github.com/pytest-dev/pytest-xdist
19 %if %{with python2}
20 BuildRequires:  python-modules >= 1:2.7
21 BuildRequires:  python-setuptools
22 BuildRequires:  python-setuptools_scm
23 %if %{with tests}
24 BuildRequires:  python-execnet >= 1.1
25 BuildRequires:  python-filelock
26 BuildRequires:  python-py >= 1.4.22
27 BuildRequires:  python-pytest >= 4.4.0
28 BuildRequires:  python-pytest-forked
29 BuildRequires:  python-six
30 BuildConflicts: python-pytest-capturelog
31 %endif
32 %endif
33 %if %{with python3}
34 BuildRequires:  python3-modules >= 1:3.5
35 BuildRequires:  python3-setuptools
36 BuildRequires:  python3-setuptools_scm
37 %if %{with tests}
38 BuildRequires:  python3-execnet >= 1.1
39 BuildRequires:  python3-filelock
40 BuildRequires:  python3-py >= 1.4.22
41 BuildRequires:  python3-pytest >= 4.4.0
42 BuildRequires:  python3-pytest-forked
43 BuildRequires:  python3-six
44 BuildConflicts: python-pytest-capturelog
45 %endif
46 %endif
47 BuildRequires:  rpm-pythonprov
48 BuildRequires:  rpmbuild(macros) >= 1.714
49 Requires:       python-modules >= 1:2.7
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
65 Requires:       python3-modules >= 1:3.5
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}
77
78 %build
79 %if %{with python2}
80 %py_build
81
82 %if %{with tests}
83 # -p no:benchmark to avoid "PytestBenchmarkWarning: Benchmarks are automatically disabled because xdist plugin is active.Benchmarks"
84 PYTHONPATH=$(pwd) \
85 %{__python} -m pytest -p no:benchmark testing
86 %endif
87 %endif
88
89 %if %{with python3}
90 %py3_build
91
92 %if %{with tests}
93 PYTHONPATH=$(pwd) \
94 %{__python3} -m pytest -p no:benchmark testing
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)
117 %doc CHANGELOG.rst ISSUES.txt LICENSE OVERVIEW.md README.rst example/boxed.txt
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)
125 %doc CHANGELOG.rst ISSUES.txt LICENSE OVERVIEW.md README.rst example/boxed.txt
126 %{py3_sitescriptdir}/xdist
127 %{py3_sitescriptdir}/pytest_xdist-%{version}-py*.egg-info
128 %endif
This page took 0.071513 seconds and 2 git commands to generate.