]> git.pld-linux.org Git - packages/python3-pytest-check.git/commitdiff
- python-pytest-check.spec updated to 2.1.4 for python 3.7+ master auto/th/python3-pytest-check-2.1.4-1
authorJakub Bogusz <qboosh@pld-linux.org>
Sun, 2 Apr 2023 19:26:59 +0000 (21:26 +0200)
committerJakub Bogusz <qboosh@pld-linux.org>
Sun, 2 Apr 2023 19:26:59 +0000 (21:26 +0200)
python-pytest-check.spec [deleted file]
python3-pytest-check.spec [new file with mode: 0644]

diff --git a/python-pytest-check.spec b/python-pytest-check.spec
deleted file mode 100644 (file)
index 07df7d6..0000000
+++ /dev/null
@@ -1,100 +0,0 @@
-#
-# Conditional build:
-%bcond_without python2 # CPython 2.x module
-%bcond_without python3 # CPython 3.x module
-
-Summary:       pytest plugin that allows multiple failures per test
-Summary(pl.UTF-8):     Wtyczka pytesta pozwalająca na wiele niepowodzeń z jednego testu
-Name:          python-pytest-check
-# keep 0.2.x for python2 support
-Version:       0.2.1
-Release:       1
-License:       MIT
-Group:         Libraries/Python
-#Source0Download: https://pypi.org/simple/pytest-check/
-Source0:       https://files.pythonhosted.org/packages/source/p/pytest-check/pytest-check-%{version}.tar.gz
-# Source0-md5: 21297eac5d350062aac1fc4eb1d081e5
-URL:           https://pypi.org/project/pytest-check/
-%if %{with python2}
-BuildRequires: python-modules >= 1:2.7
-BuildRequires: python-setuptools
-%endif
-%if %{with python3}
-BuildRequires: python3-modules >= 1:3.4
-BuildRequires: python3-setuptools
-%endif
-BuildRequires: rpm-pythonprov
-BuildRequires: rpmbuild(macros) >= 1.714
-Requires:      python-modules >= 1:2.7
-BuildArch:     noarch
-BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-
-%description
-A pytest plugin that allows multiple failures per test.
-
-This plugin was a rewrite and a rename of pytest-expect.
-
-%description -l pl.UTF-8
-Wtyczka pytesta pozwalająca na wiele niepowodzeń z jednego testu.
-
-Ta wtyczka była przepisaną wtyczką pytest-expect, z nową nazwą.
-
-%package -n python3-pytest-check
-Summary:       pytest plugin that allows multiple failures per test
-Summary(pl.UTF-8):     Wtyczka pytesta pozwalająca na wiele niepowodzeń z jednego testu
-Group:         Libraries/Python
-Requires:      python3-modules >= 1:3.4
-
-%description -n python3-pytest-check
-A pytest plugin that allows multiple failures per test.
-
-This plugin was a rewrite and a rename of pytest-expect.
-
-%description -n python3-pytest-check -l pl.UTF-8
-Wtyczka pytesta pozwalająca na wiele niepowodzeń z jednego testu.
-
-Ta wtyczka była przepisaną wtyczką pytest-expect, z nową nazwą.
-
-%prep
-%setup -q -n pytest-check-%{version}
-
-%build
-%if %{with python2}
-%py_build
-%endif
-
-%if %{with python3}
-%py3_build
-%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 README.rst
-%{py_sitescriptdir}/pytest_check
-%{py_sitescriptdir}/pytest_check-%{version}-py*.egg-info
-%endif
-
-%if %{with python3}
-%files -n python3-pytest-check
-%defattr(644,root,root,755)
-%doc README.rst
-%{py3_sitescriptdir}/pytest_check
-%{py3_sitescriptdir}/pytest_check-%{version}-py*.egg-info
-%endif
diff --git a/python3-pytest-check.spec b/python3-pytest-check.spec
new file mode 100644 (file)
index 0000000..eb93b50
--- /dev/null
@@ -0,0 +1,76 @@
+#
+# Conditional build:
+%bcond_without tests   # unit tests
+
+Summary:       pytest plugin that allows multiple failures per test
+Summary(pl.UTF-8):     Wtyczka pytesta pozwalająca na wiele niepowodzeń z jednego testu
+Name:          python3-pytest-check
+Version:       2.1.4
+Release:       1
+License:       MIT
+Group:         Libraries/Python
+#Source0Download: https://pypi.org/simple/pytest-check/
+Source0:       https://files.pythonhosted.org/packages/source/p/pytest-check/pytest-check-%{version}.tar.gz
+# Source0-md5: bbc65a525885581375623fbf187700c6
+URL:           https://pypi.org/project/pytest-check/
+BuildRequires: python3-modules >= 1:3.7
+BuildRequires: python3-setuptools
+%if %{with tests}
+BuildRequires: python3-pytest
+%endif
+BuildRequires: rpm-pythonprov
+BuildRequires: rpmbuild(macros) >= 1.714
+Requires:      python3-modules >= 1:3.7
+BuildArch:     noarch
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+A pytest plugin that allows multiple failures per test.
+
+This plugin was a rewrite and a rename of pytest-expect.
+
+%description -l pl.UTF-8
+Wtyczka pytesta pozwalająca na wiele niepowodzeń z jednego testu.
+
+Ta wtyczka była przepisaną wtyczką pytest-expect, z nową nazwą.
+
+%prep
+%setup -q -n pytest-check-%{version}
+
+# stub to build with setuptools instead of flit
+cat >setup.py <<EOF
+from setuptools import setup
+setup()
+EOF
+
+sed -ne 's/^Summary: //p' PKG-INFO > summary.txt
+
+cat >>pyproject.toml <<EOF
+[tool.setuptools.dynamic]
+description = {file = ["summary.txt"]}
+version = {attr = "pytest_check.__version__"}
+EOF
+
+%build
+%py3_build
+
+%if %{with tests}
+PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
+PYTEST_PLUGINS="pytest_check.plugin,pytester" \
+PYTHONPATH=$(pwd)/src \
+%{__python3} -m pytest tests
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%py3_install
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc LICENSE.txt README.md changelog.md
+%{py3_sitescriptdir}/pytest_check
+%{py3_sitescriptdir}/pytest_check-%{version}-py*.egg-info
This page took 0.136279 seconds and 4 git commands to generate.