]> git.pld-linux.org Git - packages/python3-pytest-cython.git/blame - python-pytest-cython.spec
rebuild with python 3.10
[packages/python3-pytest-cython.git] / python-pytest-cython.spec
CommitLineData
f3bc1ac7
JB
1#
2# Conditional build:
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
7
8Summary: Plugin for testing Cython extension modules
9Summary(pl.UTF-8): Wtyczka do testowania modułów rozszerzeń Cythona
10Name: python-pytest-cython
11Version: 0.1.1.post0
1c59d218 12Release: 2
f3bc1ac7
JB
13License: MIT
14Group: 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
17Source0: https://files.pythonhosted.org/packages/45/12/39dba6aae3257d762ef56b0667971e71544ab1932825839666152c744c1e/pytest-cython-%{version}.tar.gz
18# Source0-md5: f24330785e961eed5f9a40716a977bae
19URL: https://pypi.org/project/pytest-cython/
20%{?with_tests:BuildRequires: libstdc++-devel}
21%if %{with python2}
22BuildRequires: python-modules >= 1:2.6
23BuildRequires: python-setuptools
24%if %{with tests}
25BuildRequires: python-Cython >= 0.20.2
26BuildRequires: python-pytest >= 2.7.3
27%endif
28%endif
29%if %{with python3}
30BuildRequires: python3-modules >= 1:3.3
31BuildRequires: python3-setuptools
32%if %{with tests}
33BuildRequires: python3-Cython >= 0.20.2
34BuildRequires: python3-pytest >= 2.7.3
35%endif
36%endif
37BuildRequires: rpm-pythonprov
38BuildRequires: rpmbuild(macros) >= 1.714
39%if %{with doc}
40BuildRequires: python3-Sphinx >= 1.3
41BuildRequires: python3-sphinx_py3doc_enhanced_theme
42%endif
43Requires: python-modules >= 1:2.6
44BuildArch: noarch
45BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
46
47%description
48This Pytest plugin allows for the doctesting of C extension modules
49for Python, specifically created through Cython.
50
51%description -l pl.UTF-8
52Ta wtyczka Pytesta pozwala wykonywać doctesty modułów rozszerzeń w C
53dla Pythona, w szczególności tych utworzonych przy pomocy Cythona.
54
55%package -n python3-pytest-cython
56Summary: Plugin for testing Cython extension modules
57Summary(pl.UTF-8): Wtyczka do testowania modułów rozszerzeń Cythona
58Group: Libraries/Python
59Requires: python3-modules >= 1:3.3
60
61%description -n python3-pytest-cython
62This Pytest plugin allows for the doctesting of C extension modules
63for Python, specifically created through Cython.
64
65%description -n python3-pytest-cython -l pl.UTF-8
66Ta wtyczka Pytesta pozwala wykonywać doctesty modułów rozszerzeń w C
67dla Pythona, w szczególności tych utworzonych przy pomocy Cythona.
68
69%package apidocs
70Summary: API documentation for Python pytest-cython module
71Summary(pl.UTF-8): Dokumentacja API modułu Pythona pytest-cython
72Group: Documentation
73
74%description apidocs
75API documentation for Python pytest-cython module.
76
77%description apidocs -l pl.UTF-8
78Dokumentacja API modułu Pythona pytest-cython.
79
80%prep
81%setup -q -n pytest-cython-%{version}
82
83%build
84%if %{with python2}
85%py_build
86
87%if %{with tests}
88cd tests/example-project
89%{__python} setup.py clean build_ext --inplace --use-cython
90cd ../..
91PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
92PYTEST_PLUGINS="pytest_cython.plugin" \
93PYTHONPATH=$(pwd)/src \
94%{__python} -m pytest tests/test_pytest_cython.py
95%endif
96%endif
97
98%if %{with python3}
99%py3_build
100
101%if %{with tests}
102cd tests/example-project
103%{__python3} setup.py clean build_ext --inplace --use-cython
104cd ../..
105PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
106PYTEST_PLUGINS="pytest_cython.plugin" \
107PYTHONPATH=$(pwd)/src \
108%{__python3} -m pytest tests/test_pytest_cython.py
109%endif
110%endif
111
112%if %{with doc}
113cd docs
114PYTHONPATH=$(pwd)/../src \
115%{__python3} -m sphinx -W . build/html
116%endif
117
118%install
119rm -rf $RPM_BUILD_ROOT
120
121%if %{with python2}
122%py_install
123
124%py_postclean
125%endif
126
127%if %{with python3}
128%py3_install
129%endif
130
131%clean
132rm -rf $RPM_BUILD_ROOT
133
134%if %{with python2}
135%files
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
140%endif
141
142%if %{with python3}
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
148%endif
149
150%if %{with doc}
151%files apidocs
152%defattr(644,root,root,755)
153%doc docs/build/html/{_static,reference,*.html,*.js}
154%endif
This page took 0.135754 seconds and 4 git commands to generate.