]> git.pld-linux.org Git - packages/python-pytest-randomly.git/blame - python-pytest-randomly.spec
rebuild with tests and docs
[packages/python-pytest-randomly.git] / python-pytest-randomly.spec
CommitLineData
c8c652e9
JB
1#
2# Conditional build:
3%bcond_with tests # unit tests (more dependencies required)
4%bcond_without python2 # CPython 2.x module
2b71fea2 5%bcond_with python3 # CPython 3.x module (built from python3-pytest-randomly.spec)
c8c652e9
JB
6
7Summary: Pytest plugin to randomly order tests and control random.seed
8Summary(pl.UTF-8): Wtyczka pytesta do losowej kolejności testów i sterowania random.seed
9Name: python-pytest-randomly
2b71fea2 10# keep 1.x here for python2 support
c8c652e9 11Version: 1.2.3
78106927 12Release: 2
c8c652e9
JB
13License: BSD
14Group: Libraries/Python
15#Source0Download: https://pypi.org/simple/pytest-randomly/
16Source0: https://files.pythonhosted.org/packages/source/p/pytest-randomly/pytest-randomly-%{version}.tar.gz
17# Source0-md5: a14d9ac82ac744e7c3ddf51e62d5c751
18URL: https://pypi.org/project/pytest-randomly/
19%if %{with python2}
20BuildRequires: python-modules >= 1:2.7
21BuildRequires: python-setuptools
22%if %{with tests}
23BuildRequires: python-factory_boy
24BuildRequires: python-faker
25BuildRequires: python-numpy
26BuildRequires: python-six
27BuildRequires: python-pytest
28%endif
29%endif
30%if %{with python3}
31BuildRequires: python3-modules >= 1:3.4
32BuildRequires: python3-setuptools
33%if %{with tests}
34BuildRequires: python3-factory_boy
35BuildRequires: python3-faker
36BuildRequires: python3-numpy
37BuildRequires: python3-six
38BuildRequires: python3-pytest
39%endif
40%endif
41BuildRequires: rpm-pythonprov
42BuildRequires: rpmbuild(macros) >= 1.714
43Requires: python-modules >= 1:2.7
44BuildArch: noarch
45BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
46
47%description
48Pytest plugin to randomly order tests and control random.seed.
49
50%description -l pl.UTF-8
51Wtyczka pytesta do losowej kolejności testów i sterowania random.seed.
52
53%package -n python3-pytest-randomly
54Summary: Pytest plugin to randomly order tests and control random.seed
55Summary(pl.UTF-8): Wtyczka pytesta do losowej kolejności testów i sterowania random.seed
56Group: Libraries/Python
57Requires: python3-modules >= 1:3.4
58
59%description -n python3-pytest-randomly
60Pytest plugin to randomly order tests and control random.seed.
61
62%description -n python3-pytest-randomly -l pl.UTF-8
63Wtyczka 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}
73PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
74PYTEST_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}
83PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
84PYTEST_PLUGINS="pytester,pytest_randomly" \
85%{__python3} -m pytest tests
86%endif
87%endif
88
89%install
90rm -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
103rm -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.095661 seconds and 4 git commands to generate.