3 %bcond_without doc # Sphinx documentation
4 %bcond_with tests # unit tests (one failing on py3)
5 %bcond_without python2 # CPython 2.x module
6 %bcond_without python3 # CPython 3.x module
8 Summary: Plugin for testing Cython extension modules
9 Summary(pl.UTF-8): Wtyczka do testowania modułów rozszerzeń Cythona
10 Name: python-pytest-cython
14 Group: Libraries/Python
15 #Source0Download: https://pypi.org/simple/pytest-cython/
16 #Source0: https://files.pythonhosted.org/packages/source/p/pytest-cython/pytest-cython-%{version}.tar.gz
17 Source0: https://files.pythonhosted.org/packages/45/12/39dba6aae3257d762ef56b0667971e71544ab1932825839666152c744c1e/pytest-cython-%{version}.tar.gz
18 # Source0-md5: f24330785e961eed5f9a40716a977bae
19 URL: https://pypi.org/project/pytest-cython/
20 %{?with_tests:BuildRequires: libstdc++-devel}
22 BuildRequires: python-modules >= 1:2.6
23 BuildRequires: python-setuptools
25 BuildRequires: python-Cython >= 0.20.2
26 BuildRequires: python-pytest >= 2.7.3
30 BuildRequires: python3-modules >= 1:3.3
31 BuildRequires: python3-setuptools
33 BuildRequires: python3-Cython >= 0.20.2
34 BuildRequires: python3-pytest >= 2.7.3
37 BuildRequires: rpm-pythonprov
38 BuildRequires: rpmbuild(macros) >= 1.714
40 BuildRequires: python3-Sphinx >= 1.3
41 BuildRequires: python3-sphinx_py3doc_enhanced_theme
43 Requires: python-modules >= 1:2.6
45 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
48 This Pytest plugin allows for the doctesting of C extension modules
49 for Python, specifically created through Cython.
51 %description -l pl.UTF-8
52 Ta wtyczka Pytesta pozwala wykonywać doctesty modułów rozszerzeń w C
53 dla Pythona, w szczególności tych utworzonych przy pomocy Cythona.
55 %package -n python3-pytest-cython
56 Summary: Plugin for testing Cython extension modules
57 Summary(pl.UTF-8): Wtyczka do testowania modułów rozszerzeń Cythona
58 Group: Libraries/Python
59 Requires: python3-modules >= 1:3.3
61 %description -n python3-pytest-cython
62 This Pytest plugin allows for the doctesting of C extension modules
63 for Python, specifically created through Cython.
65 %description -n python3-pytest-cython -l pl.UTF-8
66 Ta wtyczka Pytesta pozwala wykonywać doctesty modułów rozszerzeń w C
67 dla Pythona, w szczególności tych utworzonych przy pomocy Cythona.
70 Summary: API documentation for Python pytest-cython module
71 Summary(pl.UTF-8): Dokumentacja API modułu Pythona pytest-cython
75 API documentation for Python pytest-cython module.
77 %description apidocs -l pl.UTF-8
78 Dokumentacja API modułu Pythona pytest-cython.
81 %setup -q -n pytest-cython-%{version}
88 cd tests/example-project
89 %{__python} setup.py clean build_ext --inplace --use-cython
91 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
92 PYTEST_PLUGINS="pytest_cython.plugin" \
93 PYTHONPATH=$(pwd)/src \
94 %{__python} -m pytest tests/test_pytest_cython.py
102 cd tests/example-project
103 %{__python3} setup.py clean build_ext --inplace --use-cython
105 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
106 PYTEST_PLUGINS="pytest_cython.plugin" \
107 PYTHONPATH=$(pwd)/src \
108 %{__python3} -m pytest tests/test_pytest_cython.py
114 PYTHONPATH=$(pwd)/../src \
115 %{__python3} -m sphinx -W . build/html
119 rm -rf $RPM_BUILD_ROOT
132 rm -rf $RPM_BUILD_ROOT
136 %defattr(644,root,root,755)
137 %doc CHANGELOG.rst LICENSE README.rst
138 %{py_sitescriptdir}/pytest_cython
139 %{py_sitescriptdir}/pytest_cython-%{version}-py*.egg-info
143 %files -n python3-pytest-cython
144 %defattr(644,root,root,755)
145 %doc CHANGELOG.rst LICENSE README.rst
146 %{py3_sitescriptdir}/pytest_cython
147 %{py3_sitescriptdir}/pytest_cython-%{version}-py*.egg-info
152 %defattr(644,root,root,755)
153 %doc docs/build/html/{_static,reference,*.html,*.js}