3 %bcond_without doc # Sphinx documentation
4 %bcond_without tests # unit tests
6 Summary: Plugin for testing Cython extension modules
7 Summary(pl.UTF-8): Wtyczka do testowania modułów rozszerzeń Cythona
8 Name: python3-pytest-cython
12 Group: Libraries/Python
13 #Source0Download: https://pypi.org/simple/pytest-cython/
14 Source0: https://files.pythonhosted.org/packages/source/p/pytest-cython/pytest-cython-%{version}.tar.gz
15 # Source0-md5: 4efc5b43e0b10f3995f14bda0eeebce0
16 URL: https://pypi.org/project/pytest-cython/
17 %{?with_tests:BuildRequires: libstdc++-devel}
18 BuildRequires: python3-modules >= 1:3.6
19 BuildRequires: python3-setuptools
21 BuildRequires: python3-Cython >= 0.28
22 BuildRequires: python3-pytest >= 4.6.0
24 BuildRequires: rpm-pythonprov
25 BuildRequires: rpmbuild(macros) >= 1.714
27 BuildRequires: python3-sphinx_py3doc_enhanced_theme
28 BuildRequires: sphinx-pdg-3 >= 1.3
30 Requires: python3-modules >= 1:3.6
32 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35 This Pytest plugin allows for the doctesting of C extension modules
36 for Python, specifically created through Cython.
38 %description -l pl.UTF-8
39 Ta wtyczka Pytesta pozwala wykonywać doctesty modułów rozszerzeń w C
40 dla Pythona, w szczególności tych utworzonych przy pomocy Cythona.
43 Summary: API documentation for Python pytest-cython module
44 Summary(pl.UTF-8): Dokumentacja API modułu Pythona pytest-cython
48 API documentation for Python pytest-cython module.
50 %description apidocs -l pl.UTF-8
51 Dokumentacja API modułu Pythona pytest-cython.
54 %setup -q -n pytest-cython-%{version}
60 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
61 PYTEST_PLUGINS="pytest_cython.plugin" \
62 PYTHONPATH=$(pwd)/src \
63 %{__python3} -m pytest tests/test_pytest_cython.py
67 PYTHONPATH=$(pwd)/src \
68 sphinx-build-3 docs docs/build/html
72 rm -rf $RPM_BUILD_ROOT
77 rm -rf $RPM_BUILD_ROOT
80 %defattr(644,root,root,755)
81 %doc CHANGELOG.rst LICENSE README.rst
82 %{py3_sitescriptdir}/pytest_cython
83 %{py3_sitescriptdir}/pytest_cython-%{version}-py*.egg-info
87 %defattr(644,root,root,755)
88 %doc docs/build/html/{_static,*.html,*.js}