[packages/python-pytest-cython] - new

qboosh qboosh at pld-linux.org
Sat Dec 18 21:42:09 CET 2021


commit f3bc1ac728da59da2c7162c3fc26a59eb4124814
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sat Dec 18 21:42:43 2021 +0100

    - new

 python-pytest-cython.spec | 154 ++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 154 insertions(+)
---
diff --git a/python-pytest-cython.spec b/python-pytest-cython.spec
new file mode 100644
index 0000000..538a271
--- /dev/null
+++ b/python-pytest-cython.spec
@@ -0,0 +1,154 @@
+#
+# Conditional build:
+%bcond_without	doc	# Sphinx documentation
+%bcond_with	tests	# unit tests (one failing on py3)
+%bcond_without	python2 # CPython 2.x module
+%bcond_without	python3 # CPython 3.x module
+
+Summary:	Plugin for testing Cython extension modules
+Summary(pl.UTF-8):	Wtyczka do testowania modułów rozszerzeń Cythona
+Name:		python-pytest-cython
+Version:	0.1.1.post0
+Release:	1
+License:	MIT
+Group:		Libraries/Python
+#Source0Download: https://pypi.org/simple/pytest-cython/
+#Source0:	https://files.pythonhosted.org/packages/source/p/pytest-cython/pytest-cython-%{version}.tar.gz
+Source0:	https://files.pythonhosted.org/packages/45/12/39dba6aae3257d762ef56b0667971e71544ab1932825839666152c744c1e/pytest-cython-%{version}.tar.gz
+# Source0-md5:	f24330785e961eed5f9a40716a977bae
+URL:		https://pypi.org/project/pytest-cython/
+%{?with_tests:BuildRequires:	libstdc++-devel}
+%if %{with python2}
+BuildRequires:	python-modules >= 1:2.6
+BuildRequires:	python-setuptools
+%if %{with tests}
+BuildRequires:	python-Cython >= 0.20.2
+BuildRequires:	python-pytest >= 2.7.3
+%endif
+%endif
+%if %{with python3}
+BuildRequires:	python3-modules >= 1:3.3
+BuildRequires:	python3-setuptools
+%if %{with tests}
+BuildRequires:	python3-Cython >= 0.20.2
+BuildRequires:	python3-pytest >= 2.7.3
+%endif
+%endif
+BuildRequires:	rpm-pythonprov
+BuildRequires:	rpmbuild(macros) >= 1.714
+%if %{with doc}
+BuildRequires:	python3-Sphinx >= 1.3
+BuildRequires:	python3-sphinx_py3doc_enhanced_theme
+%endif
+Requires:	python-modules >= 1:2.6
+BuildArch:	noarch
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+This Pytest plugin allows for the doctesting of C extension modules
+for Python, specifically created through Cython.
+
+%description -l pl.UTF-8
+Ta wtyczka Pytesta pozwala wykonywać doctesty modułów rozszerzeń w C
+dla Pythona, w szczególności tych utworzonych przy pomocy Cythona.
+
+%package -n python3-pytest-cython
+Summary:	Plugin for testing Cython extension modules
+Summary(pl.UTF-8):	Wtyczka do testowania modułów rozszerzeń Cythona
+Group:		Libraries/Python
+Requires:	python3-modules >= 1:3.3
+
+%description -n python3-pytest-cython
+This Pytest plugin allows for the doctesting of C extension modules
+for Python, specifically created through Cython.
+
+%description -n python3-pytest-cython -l pl.UTF-8
+Ta wtyczka Pytesta pozwala wykonywać doctesty modułów rozszerzeń w C
+dla Pythona, w szczególności tych utworzonych przy pomocy Cythona.
+
+%package apidocs
+Summary:	API documentation for Python pytest-cython module
+Summary(pl.UTF-8):	Dokumentacja API modułu Pythona pytest-cython
+Group:		Documentation
+
+%description apidocs
+API documentation for Python pytest-cython module.
+
+%description apidocs -l pl.UTF-8
+Dokumentacja API modułu Pythona pytest-cython.
+
+%prep
+%setup -q -n pytest-cython-%{version}
+
+%build
+%if %{with python2}
+%py_build
+
+%if %{with tests}
+cd tests/example-project
+%{__python} setup.py clean build_ext --inplace --use-cython
+cd ../..
+PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
+PYTEST_PLUGINS="pytest_cython.plugin" \
+PYTHONPATH=$(pwd)/src \
+%{__python} -m pytest tests/test_pytest_cython.py
+%endif
+%endif
+
+%if %{with python3}
+%py3_build
+
+%if %{with tests}
+cd tests/example-project
+%{__python3} setup.py clean build_ext --inplace --use-cython
+cd ../..
+PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
+PYTEST_PLUGINS="pytest_cython.plugin" \
+PYTHONPATH=$(pwd)/src \
+%{__python3} -m pytest tests/test_pytest_cython.py
+%endif
+%endif
+
+%if %{with doc}
+cd docs
+PYTHONPATH=$(pwd)/../src \
+%{__python3} -m sphinx -W . build/html
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%if %{with python2}
+%py_install
+
+%py_postclean
+%endif
+
+%if %{with python3}
+%py3_install
+%endif
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%if %{with python2}
+%files
+%defattr(644,root,root,755)
+%doc CHANGELOG.rst LICENSE README.rst
+%{py_sitescriptdir}/pytest_cython
+%{py_sitescriptdir}/pytest_cython-%{version}-py*.egg-info
+%endif
+
+%if %{with python3}
+%files -n python3-pytest-cython
+%defattr(644,root,root,755)
+%doc CHANGELOG.rst LICENSE README.rst
+%{py3_sitescriptdir}/pytest_cython
+%{py3_sitescriptdir}/pytest_cython-%{version}-py*.egg-info
+%endif
+
+%if %{with doc}
+%files apidocs
+%defattr(644,root,root,755)
+%doc docs/build/html/{_static,reference,*.html,*.js}
+%endif
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-pytest-cython.git/commitdiff/f3bc1ac728da59da2c7162c3fc26a59eb4124814



More information about the pld-cvs-commit mailing list