]> git.pld-linux.org Git - packages/python-pytest-cython.git/blame - python-pytest-cython.spec
- disable python3 here
[packages/python-pytest-cython.git] / python-pytest-cython.spec
CommitLineData
f3bc1ac7
JB
1#
2# Conditional build:
3%bcond_without doc # Sphinx documentation
ae66e37f 4%bcond_without tests # unit tests (failed for python3)
f3bc1ac7 5%bcond_without python2 # CPython 2.x module
ae66e37f 6%bcond_with python3 # CPython 3.x module (built from python3-pytest-cython.spec)
f3bc1ac7
JB
7
8Summary: Plugin for testing Cython extension modules
9Summary(pl.UTF-8): Wtyczka do testowania modułów rozszerzeń Cythona
10Name: python-pytest-cython
ae66e37f 11# keep 0.1.x here for python2 support
f3bc1ac7 12Version: 0.1.1.post0
1c59d218 13Release: 2
f3bc1ac7
JB
14License: MIT
15Group: Libraries/Python
16#Source0Download: https://pypi.org/simple/pytest-cython/
ae66e37f 17Source0: https://files.pythonhosted.org/packages/source/p/pytest-cython/pytest-cython-%{version}.tar.gz
f3bc1ac7
JB
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}
ae66e37f
JB
40BuildRequires: python-sphinx_py3doc_enhanced_theme
41BuildRequires: sphinx-pdg-2 >= 1.3
f3bc1ac7
JB
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}
ae66e37f
JB
113#cd docs
114PYTHONPATH=$(pwd)/src \
115sphinx-build-2 docs docs/build/html
116#%{__python3} -m sphinx . build/html
f3bc1ac7
JB
117%endif
118
119%install
120rm -rf $RPM_BUILD_ROOT
121
122%if %{with python2}
123%py_install
124
125%py_postclean
126%endif
127
128%if %{with python3}
129%py3_install
130%endif
131
132%clean
133rm -rf $RPM_BUILD_ROOT
134
135%if %{with python2}
136%files
137%defattr(644,root,root,755)
138%doc CHANGELOG.rst LICENSE README.rst
139%{py_sitescriptdir}/pytest_cython
140%{py_sitescriptdir}/pytest_cython-%{version}-py*.egg-info
141%endif
142
143%if %{with python3}
144%files -n python3-pytest-cython
145%defattr(644,root,root,755)
146%doc CHANGELOG.rst LICENSE README.rst
147%{py3_sitescriptdir}/pytest_cython
148%{py3_sitescriptdir}/pytest_cython-%{version}-py*.egg-info
149%endif
150
151%if %{with doc}
152%files apidocs
153%defattr(644,root,root,755)
154%doc docs/build/html/{_static,reference,*.html,*.js}
155%endif
This page took 0.089149 seconds and 4 git commands to generate.