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