]> git.pld-linux.org Git - packages/python-pytest-randomly.git/blob - python-pytest-randomly.spec
- disable python3 here (this version doesn't support python 3.9)
[packages/python-pytest-randomly.git] / python-pytest-randomly.spec
1 #
2 # Conditional build:
3 %bcond_with     tests   # unit tests (more dependencies required)
4 %bcond_without  python2 # CPython 2.x module
5 %bcond_with     python3 # CPython 3.x module (built from python3-pytest-randomly.spec)
6
7 Summary:        Pytest plugin to randomly order tests and control random.seed
8 Summary(pl.UTF-8):      Wtyczka pytesta do losowej kolejności testów i sterowania random.seed
9 Name:           python-pytest-randomly
10 # keep 1.x here for python2 support
11 Version:        1.2.3
12 Release:        1
13 License:        BSD
14 Group:          Libraries/Python
15 #Source0Download: https://pypi.org/simple/pytest-randomly/
16 Source0:        https://files.pythonhosted.org/packages/source/p/pytest-randomly/pytest-randomly-%{version}.tar.gz
17 # Source0-md5:  a14d9ac82ac744e7c3ddf51e62d5c751
18 URL:            https://pypi.org/project/pytest-randomly/
19 %if %{with python2}
20 BuildRequires:  python-modules >= 1:2.7
21 BuildRequires:  python-setuptools
22 %if %{with tests}
23 BuildRequires:  python-factory_boy
24 BuildRequires:  python-faker
25 BuildRequires:  python-numpy
26 BuildRequires:  python-six
27 BuildRequires:  python-pytest
28 %endif
29 %endif
30 %if %{with python3}
31 BuildRequires:  python3-modules >= 1:3.4
32 BuildRequires:  python3-setuptools
33 %if %{with tests}
34 BuildRequires:  python3-factory_boy
35 BuildRequires:  python3-faker
36 BuildRequires:  python3-numpy
37 BuildRequires:  python3-six
38 BuildRequires:  python3-pytest
39 %endif
40 %endif
41 BuildRequires:  rpm-pythonprov
42 BuildRequires:  rpmbuild(macros) >= 1.714
43 Requires:       python-modules >= 1:2.7
44 BuildArch:      noarch
45 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
46
47 %description
48 Pytest plugin to randomly order tests and control random.seed.
49
50 %description -l pl.UTF-8
51 Wtyczka pytesta do losowej kolejności testów i sterowania random.seed.
52
53 %package -n python3-pytest-randomly
54 Summary:        Pytest plugin to randomly order tests and control random.seed
55 Summary(pl.UTF-8):      Wtyczka pytesta do losowej kolejności testów i sterowania random.seed
56 Group:          Libraries/Python
57 Requires:       python3-modules >= 1:3.4
58
59 %description -n python3-pytest-randomly
60 Pytest plugin to randomly order tests and control random.seed.
61
62 %description -n python3-pytest-randomly -l pl.UTF-8
63 Wtyczka pytesta do losowej kolejności testów i sterowania random.seed.
64
65 %prep
66 %setup -q -n pytest-randomly-%{version}
67
68 %build
69 %if %{with python2}
70 %py_build
71
72 %if %{with tests}
73 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
74 PYTEST_PLUGINS="pytester,pytest_randomly" \
75 %{__python} -m pytest tests
76 %endif
77 %endif
78
79 %if %{with python3}
80 %py3_build
81
82 %if %{with tests}
83 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
84 PYTEST_PLUGINS="pytester,pytest_randomly" \
85 %{__python3} -m pytest tests
86 %endif
87 %endif
88
89 %install
90 rm -rf $RPM_BUILD_ROOT
91
92 %if %{with python2}
93 %py_install
94
95 %py_postclean
96 %endif
97
98 %if %{with python3}
99 %py3_install
100 %endif
101
102 %clean
103 rm -rf $RPM_BUILD_ROOT
104
105 %if %{with python2}
106 %files
107 %defattr(644,root,root,755)
108 %doc AUTHORS.rst HISTORY.rst LICENSE README.rst
109 %{py_sitescriptdir}/pytest_randomly.py[co]
110 %{py_sitescriptdir}/pytest_randomly-%{version}-py*.egg-info
111 %endif
112
113 %if %{with python3}
114 %files -n python3-pytest-randomly
115 %defattr(644,root,root,755)
116 %doc AUTHORS.rst HISTORY.rst LICENSE README.rst
117 %{py3_sitescriptdir}/pytest_randomly.py
118 %{py3_sitescriptdir}/__pycache__/pytest_randomly.cpython-*.py[co]
119 %{py3_sitescriptdir}/pytest_randomly-%{version}-py*.egg-info
120 %endif
This page took 0.042392 seconds and 3 git commands to generate.