]> git.pld-linux.org Git - packages/python-pytest-forked.git/blob - python-pytest-forked.spec
cf5685dfb277adb247b161ceba1447f75c55ebca
[packages/python-pytest-forked.git] / python-pytest-forked.spec
1 #
2 # Conditional build:
3 %bcond_without  tests   # unit tests
4 %bcond_without  python2 # CPython 2.x module
5 %bcond_without  python3 # CPython 3.x module
6
7 Summary:        Run each test in a forked subprocess
8 Summary(pl.UTF-8):      Uruchamianie każdego testu w oddzielnym procesie
9 Name:           python-pytest-forked
10 Version:        0.2
11 Release:        2
12 License:        MIT
13 Group:          Libraries/Python
14 #Source0Download: https://pypi.org/simple/pytest-forked/
15 Source0:        https://files.pythonhosted.org/packages/source/p/pytest-forked/pytest-forked-%{version}.tar.gz
16 # Source0-md5:  133167c9c56c9121c80852f9cd702140
17 URL:            https://github.com/pytest-dev/pytest-forked
18 %if %{with python2}
19 BuildRequires:  python-modules >= 1:2.7
20 BuildRequires:  python-setuptools
21 BuildRequires:  python-setuptools_scm
22 %if %{with tests}
23 BuildRequires:  python-pytest >= 2.6.0
24 %endif
25 %endif
26 %if %{with python3}
27 BuildRequires:  python3-modules >= 1:3.5
28 BuildRequires:  python3-setuptools
29 BuildRequires:  python3-setuptools_scm
30 %if %{with tests}
31 BuildRequires:  python3-pytest >= 2.6.0
32 %endif
33 %endif
34 BuildRequires:  rpm-pythonprov
35 BuildRequires:  rpmbuild(macros) >= 1.714
36 Requires:       python-modules >= 1:2.7
37 BuildArch:      noarch
38 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39
40 %description
41 Run each test in a forked subprocess.
42
43 %description -l pl.UTF-8
44 Uruchamianie każdego testu w oddzielnym procesie.
45
46 %package -n python3-pytest-forked
47 Summary:        Run each test in a forked subprocess
48 Summary(pl.UTF-8):      Uruchamianie każdego testu w oddzielnym procesie
49 Group:          Libraries/Python
50 Requires:       python3-modules >= 1:3.5
51
52 %description -n python3-pytest-forked
53 Run each test in a forked subprocess.
54
55 %description -n python3-pytest-forked -l pl.UTF-8
56 Uruchamianie każdego testu w oddzielnym procesie.
57
58 %prep
59 %setup -q -n pytest-forked-%{version}
60
61 # kill precompiled objects
62 %{__rm} -r testing/*.pyc testing/__pycache__
63
64 %build
65 %if %{with python2}
66 %py_build
67
68 %if %{with tests}
69 PYTHONPATH=$(pwd)/src \
70 %{__python} -m pytest testing
71 %endif
72 %endif
73
74 %if %{with python3}
75 %py3_build
76
77 %if %{with tests}
78 PYTHONPATH=$(pwd)/src \
79 %{__python3} -m pytest testing
80 %endif
81 %endif
82
83 %install
84 rm -rf $RPM_BUILD_ROOT
85
86 %if %{with python2}
87 %py_install
88
89 %py_postclean
90 %endif
91
92 %if %{with python3}
93 %py3_install
94 %endif
95
96 %clean
97 rm -rf $RPM_BUILD_ROOT
98
99 %if %{with python2}
100 %files
101 %defattr(644,root,root,755)
102 %doc CHANGELOG LICENSE README.rst example/boxed.txt
103 %{py_sitescriptdir}/pytest_forked
104 %{py_sitescriptdir}/pytest_forked-%{version}-py*.egg-info
105 %endif
106
107 %if %{with python3}
108 %files -n python3-pytest-forked
109 %defattr(644,root,root,755)
110 %doc CHANGELOG LICENSE README.rst example/boxed.txt
111 %{py3_sitescriptdir}/pytest_forked
112 %{py3_sitescriptdir}/pytest_forked-%{version}-py*.egg-info
113 %endif
This page took 0.046414 seconds and 2 git commands to generate.