[packages/python3-parameterized] - up to 0.9.0
baggins
baggins at pld-linux.org
Sun Mar 23 19:14:20 CET 2025
commit f5a0e0c78c0f380c98acc3a91b3b9c6da112b834
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Sun Mar 23 19:53:53 2025 +0100
- up to 0.9.0
python-parameterized-mock.patch | 14 -----
python-parameterized.spec | 117 ----------------------------------------
python3-parameterized.spec | 64 ++++++++++++++++++++++
tests.patch | 20 +++++++
4 files changed, 84 insertions(+), 131 deletions(-)
---
diff --git a/python-parameterized.spec b/python-parameterized.spec
deleted file mode 100644
index ef5c306..0000000
--- a/python-parameterized.spec
+++ /dev/null
@@ -1,117 +0,0 @@
-#
-# Conditional build:
-%bcond_without tests # unit tests
-%bcond_without python2 # CPython 2.x module
-%bcond_without python3 # CPython 3.x module
-
-Summary: Parameterized testing with any Python test framework
-Summary(pl.UTF-8): Parametryzowane testowanie w dowolnym szkielecie testów pythonowych
-Name: python-parameterized
-Version: 0.8.1
-Release: 8
-License: BSD
-Group: Libraries/Python
-#Source0Download: https://pypi.org/simple/parameterized/
-Source0: https://files.pythonhosted.org/packages/source/p/parameterized/parameterized-%{version}.tar.gz
-# Source0-md5: 30e34da8db0b31bbc5c0ed86cfa9e7c1
-Patch0: %{name}-mock.patch
-URL: https://pypi.org/project/parameterized/
-%if %{with python2}
-BuildRequires: python-modules >= 1:2.5
-BuildRequires: python-setuptools
-%if %{with tests}
-BuildRequires: python-mock
-BuildRequires: python-nose
-%endif
-%endif
-%if %{with python3}
-BuildRequires: python3-modules >= 1:3.2
-BuildRequires: python3-setuptools
-%if %{with tests}
-BuildRequires: python3-nose
-%endif
-%endif
-BuildRequires: rpm-pythonprov
-BuildRequires: rpmbuild(macros) >= 1.714
-Requires: python-modules >= 1:2.5
-BuildArch: noarch
-BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-
-%description
-Parameterized testing with any Python test framework (nose, py.test,
-unittest).
-
-%description -l pl.UTF-8
-Parametryzowane testowanie w dowolnym szkielecie testów pythonowych
-(nose, py.test, unittest).
-
-%package -n python3-parameterized
-Summary: Parameterized testing with any Python test framework
-Summary(pl.UTF-8): Parametryzowane testowanie w dowolnym szkielecie testów pythonowych
-Group: Libraries/Python
-Requires: python3-modules >= 1:3.2
-
-%description -n python3-parameterized
-Parameterized testing with any Python test framework (nose, py.test,
-unittest).
-
-%description -n python3-parameterized -l pl.UTF-8
-Parametryzowane testowanie w dowolnym szkielecie testów pythonowych
-(nose, py.test, unittest).
-
-%prep
-%setup -q -n parameterized-%{version}
-%patch -P 0 -p1
-
-%build
-%if %{with python2}
-%py_build
-
-%if %{with tests}
-nosetests-%{py_ver} parameterized/test.py
-%endif
-%endif
-
-%if %{with python3}
-%py3_build
-
-%if %{with tests}
-nosetests-%{py3_ver} parameterized/test.py
-%endif
-%endif
-
-%install
-rm -rf $RPM_BUILD_ROOT
-
-%if %{with python2}
-%py_install
-
-%py_postclean
-%{__rm} $RPM_BUILD_ROOT%{py_sitescriptdir}/parameterized/test.py*
-%endif
-
-%if %{with python3}
-%py3_install
-
-%{__rm} $RPM_BUILD_ROOT%{py3_sitescriptdir}/parameterized/test.py
-%{__rm} $RPM_BUILD_ROOT%{py3_sitescriptdir}/parameterized/__pycache__/test.*.py*
-%endif
-
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-%if %{with python2}
-%files
-%defattr(644,root,root,755)
-%doc CHANGELOG.txt LICENSE.txt README.rst
-%{py_sitescriptdir}/parameterized
-%{py_sitescriptdir}/parameterized-%{version}-py*.egg-info
-%endif
-
-%if %{with python3}
-%files -n python3-parameterized
-%defattr(644,root,root,755)
-%doc CHANGELOG.txt LICENSE.txt README.rst
-%{py3_sitescriptdir}/parameterized
-%{py3_sitescriptdir}/parameterized-%{version}-py*.egg-info
-%endif
diff --git a/python3-parameterized.spec b/python3-parameterized.spec
new file mode 100644
index 0000000..ecd6d23
--- /dev/null
+++ b/python3-parameterized.spec
@@ -0,0 +1,64 @@
+#
+# Conditional build:
+%bcond_without tests # unit tests
+
+Summary: Parameterized testing with any Python test framework
+Summary(pl.UTF-8): Parametryzowane testowanie w dowolnym szkielecie testów pythonowych
+Name: python3-parameterized
+Version: 0.9.0
+Release: 1
+License: BSD
+Group: Libraries/Python
+#Source0Download: https://pypi.org/simple/parameterized/
+Source0: https://files.pythonhosted.org/packages/source/p/parameterized/parameterized-%{version}.tar.gz
+# Source0-md5: ed1bee2fb5d9044688d8503bdda9e6f3
+Patch0: tests.patch
+URL: https://pypi.org/project/parameterized/
+BuildRequires: python3-modules >= 1:3.2
+BuildRequires: python3-build
+BuildRequires: python3-installer
+%if %{with tests}
+BuildRequires: python3-mock
+BuildRequires: python3-pynose
+%endif
+BuildRequires: rpm-pythonprov
+BuildRequires: rpmbuild(macros) >= 1.714
+Requires: python-modules >= 1:2.5
+BuildArch: noarch
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+Parameterized testing with any Python test framework (nose, py.test,
+unittest).
+
+%description -l pl.UTF-8
+Parametryzowane testowanie w dowolnym szkielecie testów pythonowych
+(nose, py.test, unittest).
+
+%prep
+%setup -q -n parameterized-%{version}
+%patch -P 0 -p1
+
+%build
+%py3_build_pyproject
+
+%if %{with tests}
+nosetests parameterized/test.py
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%py3_install_pyproject
+
+%{__rm} $RPM_BUILD_ROOT%{py3_sitescriptdir}/parameterized/test.py
+%{__rm} $RPM_BUILD_ROOT%{py3_sitescriptdir}/parameterized/__pycache__/test.*.py*
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc LICENSE.txt README.rst
+%{py3_sitescriptdir}/parameterized
+%{py3_sitescriptdir}/parameterized-%{version}.dist-info
diff --git a/python-parameterized-mock.patch b/python-parameterized-mock.patch
deleted file mode 100644
index 24ee68a..0000000
--- a/python-parameterized-mock.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- parameterized-0.8.1/parameterized/test.py.orig 2021-01-09 21:31:41.000000000 +0100
-+++ parameterized-0.8.1/parameterized/test.py 2021-02-15 18:26:49.301722405 +0100
-@@ -1,7 +1,10 @@
- # coding=utf-8
-
- import inspect
--import mock
-+try:
-+ import mock
-+except ImportError:
-+ from unittest import mock
- from unittest import TestCase
- from nose.tools import assert_equal, assert_raises
-
diff --git a/tests.patch b/tests.patch
new file mode 100644
index 0000000..7a107f8
--- /dev/null
+++ b/tests.patch
@@ -0,0 +1,20 @@
+--- parameterized-0.9.0/parameterized/test.py.orig 2023-03-27 03:43:14.000000000 +0200
++++ parameterized-0.9.0/parameterized/test.py 2025-03-23 19:51:55.389982720 +0100
+@@ -35,7 +35,7 @@
+ def func_decorator(func):
+ @wraps(func)
+ def wrapper(self, *args, **kwargs):
+- with self.assertRaisesRegexp(expected_exception, expected_regexp):
++ with self.assertRaisesRegex(expected_exception, expected_regexp):
+ func(self, *args, **kwargs)
+
+ return wrapper
+@@ -410,7 +410,7 @@
+ More"""
+ self._assert_docstring(
+ "Documentation [with foo=%r].\n\n"
+- " More" %(foo, )
++ "More" %(foo, )
+ )
+
+ @parameterized.expand([param("foo")])
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python3-parameterized.git/commitdiff/f5a0e0c78c0f380c98acc3a91b3b9c6da112b834
More information about the pld-cvs-commit
mailing list