[packages/python-pytest-order] - new, last version with python 2.7 support
qboosh
qboosh at pld-linux.org
Sat Jul 12 12:19:31 CEST 2025
commit a0af72bbea16b853e94e2c688ba3eaff3b550086
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sat Jul 12 12:20:50 2025 +0200
- new, last version with python 2.7 support
python-pytest-order.spec | 156 +++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 156 insertions(+)
---
diff --git a/python-pytest-order.spec b/python-pytest-order.spec
new file mode 100644
index 0000000..71fc8b5
--- /dev/null
+++ b/python-pytest-order.spec
@@ -0,0 +1,156 @@
+#
+# Conditional build:
+%bcond_without doc # Sphinx documentation
+%bcond_without tests # unit tests
+%bcond_without python2 # CPython 2.x module
+%bcond_with python3 # CPython 3.x module (built from python3-pytest-order.spec)
+
+Summary: pytest plugin to run your tests in a specific order
+Summary(pl.UTF-8): Wtyczka pytesta do uruchamiania testów w określonej kolejności
+Name: python-pytest-order
+# keep 0.x here for python2 support
+Version: 0.11.0
+Release: 1
+License: MIT
+Group: Libraries/Python
+#Source0Download: https://pypi.org/simple/pytest-order/
+Source0: https://files.pythonhosted.org/packages/source/p/pytest-order/pytest-order-%{version}.tar.gz
+# Source0-md5: 06a34d910bc5b4c66fb06e597d7bae10
+URL: https://pypi.org/project/pytest-order/
+%if %{with python2}
+BuildRequires: python-modules >= 1:2.7
+BuildRequires: python-setuptools
+%if %{with tests}
+BuildRequires: python-pytest
+BuildRequires: python-pytest-dependency
+BuildRequires: python-pytest-mock
+BuildRequires: python-pytest-xdist
+%endif
+%endif
+%if %{with python3}
+BuildRequires: python3-modules >= 1:3.5
+BuildRequires: python3-setuptools
+%if %{with tests}
+BuildRequires: python3-pytest
+BuildRequires: python3-pytest-dependency
+BuildRequires: python3-pytest-mock
+BuildRequires: python3-pytest-xdist
+%endif
+%endif
+BuildRequires: rpm-pythonprov
+BuildRequires: rpmbuild(macros) >= 1.714
+%if %{with doc}
+BuildRequires: sphinx-pdg-2
+%endif
+Requires: python-modules >= 1:2.7
+BuildArch: noarch
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+pytest-order is a pytest plugin that allows you to customize the order
+in which your tests are run. It uses the marker "order" that defines
+when a specific test shall be run relative to the other tests.
+
+%description -l pl.UTF-8
+pytest-order to wtyczka pytesta pozwalająca dostosować kolejność, w
+jakiej testy są uruchamiane. Wykorzystuje znacznik "order",
+określający kiedy dany test powinien być uruchomiony względem innych
+testów.
+
+%package -n python3-pytest-order
+Summary: pytest plugin to run your tests in a specific order
+Summary(pl.UTF-8): Wtyczka pytesta do uruchamiania testów w określonej kolejności
+Group: Libraries/Python
+Requires: python3-modules >= 1:3.5
+
+%description -n python3-pytest-order
+pytest-order is a pytest plugin that allows you to customize the order
+in which your tests are run. It uses the marker "order" that defines
+when a specific test shall be run relative to the other tests.
+
+%description -n python3-pytest-order -l pl.UTF-8
+pytest-order to wtyczka pytesta pozwalająca dostosować kolejność, w
+jakiej testy są uruchamiane. Wykorzystuje znacznik "order",
+określający kiedy dany test powinien być uruchomiony względem innych
+testów.
+
+%package apidocs
+Summary: API documentation for Python pytest-order module
+Summary(pl.UTF-8): Dokumentacja API modułu Pythona pytest-order
+Group: Documentation
+
+%description apidocs
+API documentation for Python pytest-order module.
+
+%description apidocs -l pl.UTF-8
+Dokumentacja API modułu Pythona pytest-order.
+
+%prep
+%setup -q -n pytest-order-%{version}
+
+%build
+%if %{with python2}
+%py_build
+
+%if %{with tests}
+# xdist requires python sources
+PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
+PYTEST_PLUGINS=pytest_order.plugin,pytest_dependency,pytest_mock.plugin,xdist.plugin \
+PYTHONPATH=$(pwd) \
+%{__python} -m pytest tests -k 'not test_xdist_handling'
+%endif
+%endif
+
+%if %{with python3}
+%py3_build
+
+%if %{with tests}
+PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
+PYTEST_PLUGINS=pytest_order.plugin,pytest_dependency,pytest_mock.plugin,xdist.plugin \
+PYTHONPATH=$(pwd) \
+%{__python3} -m pytest tests
+%endif
+%endif
+
+%if %{with doc}
+%{__make} -C docs html \
+ SPHINXBUILD=sphinx-build-2
+%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 AUTHORS CHANGELOG.md LICENSE README.md
+%{py_sitescriptdir}/pytest_order
+%{py_sitescriptdir}/pytest_order-%{version}-py*.egg-info
+%endif
+
+%if %{with python3}
+%files -n python3-pytest-order
+%defattr(644,root,root,755)
+%doc AUTHORS CHANGELOG.md LICENSE README.md
+%{py3_sitescriptdir}/pytest_order
+%{py3_sitescriptdir}/pytest_order-%{version}-py*.egg-info
+%endif
+
+%if %{with doc}
+%files apidocs
+%defattr(644,root,root,755)
+%doc docs/build/html/{_static,*.html,*.js}
+%endif
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python-pytest-order.git/commitdiff/a0af72bbea16b853e94e2c688ba3eaff3b550086
More information about the pld-cvs-commit
mailing list