]> git.pld-linux.org Git - SPECS.git/blob - python-pytest-cache.spec
SPECS updated Sat 31 Jul 20:26:02 CEST 2021
[SPECS.git] / python-pytest-cache.spec
1 # NOTE: functionality included in pytest 2.8.0
2 #
3 # Conditional build:
4 %bcond_without  doc     # Sphinx documentation
5 %bcond_with     tests   # py.test tests
6 %bcond_without  python2 # CPython 2.x module
7 %bcond_without  python3 # CPython 3.x module
8
9 Summary:        pytest-cache module: working with cross-testrun state
10 Summary(pl.UTF-8):      Moduł pytest-cache - praca ze stanem pomiędzy uruchomieniami testów
11 Name:           python-pytest-cache
12 Version:        1.0
13 Release:        0.1
14 License:        MIT
15 Group:          Libraries/Python
16 #Source0Download: https://pypi.python.org/simple/pytest-cache
17 Source0:        https://pypi.python.org/packages/source/p/pytest-cache/pytest-cache-%{version}.tar.gz
18 # Source0-md5:  e51ff62fec70a1fd456d975ce47977cd
19 URL:            http://bitbucket.org/hpk42/pytest-cache/
20 %if %{with python2}
21 BuildRequires:  python-modules >= 1:2.5
22 BuildRequires:  python-setuptools
23 %if %{with tests}
24 BuildRequires:  python-execnet >= 1.1
25 BuildRequires:  python-pytest >= 2.2
26 BuildRequires:  python-pytest < 2.8
27 BuildRequires:  python-pytest-xdist
28 %endif
29 %endif
30 %if %{with python3}
31 BuildRequires:  python3-modules >= 1:3.2
32 BuildRequires:  python3-setuptools
33 %if %{with tests}
34 BuildRequires:  python3-execnet >= 1.1
35 BuildRequires:  python3-pytest >= 2.2
36 BuildRequires:  python3-pytest < 2.8
37 BuildRequires:  python3-pytest-xdist
38 %endif
39 %endif
40 BuildRequires:  rpm-pythonprov
41 BuildRequires:  rpmbuild(macros) >= 1.714
42 Requires:       python-modules >= 1:2.5
43 Requires:       python-pytest < 2.8
44 BuildArch:      noarch
45 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
46
47 %description
48 pytest-cache module: working with cross-testrun state.
49
50 %description -l pl.UTF-8
51 Moduł pytest-cache - praca ze stanem pomiędzy uruchomieniami testów.
52
53 %package -n python3-pytest-cache
54 Summary:        pytest-cache module: working with cross-testrun state
55 Summary(pl.UTF-8):      Moduł pytest-cache - praca ze stanem pomiędzy uruchomieniami testów
56 Group:          Libraries/Python
57 Requires:       python3-modules >= 1:3.2
58 Requires:       python3-pytest < 2.8
59
60 %description -n python3-pytest-cache
61 pytest-cache module: working with cross-testrun state.
62
63 %description -n python3-pytest-cache -l pl.UTF-8
64 Moduł pytest-cache - praca ze stanem pomiędzy uruchomieniami testów.
65
66 %package apidocs
67 Summary:        Documentation for pytest-cache module
68 Summary(pl.UTF-8):      Dokumentacja modułu pytest-cache
69 Group:          Documentation
70
71 %description apidocs
72 Documentation for pytest-cache module.
73
74 %description apidocs -l pl.UTF-8
75 Dokumentacja modułu pytest-cache.
76
77 %prep
78 %setup -q -n pytest-cache-%{version}
79
80 %build
81 %if %{with python2}
82 %py_build
83
84 %if %{with tests}
85 PYTHONPATH=$(pwd) PYTEST_PLUGINS=pytest_cache %{__python} -m pytest
86 %endif
87 %endif
88
89 %if %{with python3}
90 %py3_build
91
92 %if %{with tests}
93 PYTHONPATH=$(pwd) PYTEST_PLUGINS=pytest_cache %{__python3} -m pytest
94 %endif
95 %endif
96
97 %if %{with doc}
98 PYTHONPATH=$(pwd) \
99 %{__make} -C doc html
100 %endif
101
102 %install
103 rm -rf $RPM_BUILD_ROOT
104
105 %if %{with python2}
106 %py_install
107
108 %py_postclean
109 %endif
110
111 %if %{with python3}
112 %py3_install
113 %endif
114
115 %clean
116 rm -rf $RPM_BUILD_ROOT
117
118 %if %{with python2}
119 %files
120 %defattr(644,root,root,755)
121 %doc CHANGELOG LICENSE README.rst
122 %{py_sitescriptdir}/pytest_cache.py[co]
123 %{py_sitescriptdir}/pytest_cache-%{version}-py*.egg-info
124 %endif
125
126 %if %{with python3}
127 %files -n python3-pytest-cache
128 %defattr(644,root,root,755)
129 %doc CHANGELOG LICENSE README.rst
130 %{py3_sitescriptdir}/pytest_cache.py
131 %{py3_sitescriptdir}/__pycache__/pytest_cache.cpython-*.py[co]
132 %{py3_sitescriptdir}/pytest_cache-%{version}-py*.egg-info
133 %endif
134
135 %if %{with doc}
136 %files apidocs
137 %defattr(644,root,root,755)
138 %doc doc/_build/html/{_static,*.html,*.js}
139 %endif
This page took 0.138261 seconds and 3 git commands to generate.