From 0df0bfc614443a887dc3e1cc9296b4ee65ca5371 Mon Sep 17 00:00:00 2001 From: tigro Date: Sun, 5 Jan 2025 23:25:57 +0300 Subject: [PATCH] import python-hamcrest-2.0.3-8.el10 --- .gitignore | 1 + .python-hamcrest.metadata | 1 + SOURCES/numpy-1.20.0-alias-depr.patch | 29 +++++ SPECS/python-hamcrest.spec | 153 ++++++++++++++++++++++++++ 4 files changed, 184 insertions(+) create mode 100644 .gitignore create mode 100644 .python-hamcrest.metadata create mode 100644 SOURCES/numpy-1.20.0-alias-depr.patch create mode 100644 SPECS/python-hamcrest.spec diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6f5e85c --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/python-hamcrest-2.0.3.tar.gz diff --git a/.python-hamcrest.metadata b/.python-hamcrest.metadata new file mode 100644 index 0000000..6b5b2c8 --- /dev/null +++ b/.python-hamcrest.metadata @@ -0,0 +1 @@ +b733022c6fc347170276ee73a56c624beca1a48d SOURCES/python-hamcrest-2.0.3.tar.gz diff --git a/SOURCES/numpy-1.20.0-alias-depr.patch b/SOURCES/numpy-1.20.0-alias-depr.patch new file mode 100644 index 0000000..ce540d3 --- /dev/null +++ b/SOURCES/numpy-1.20.0-alias-depr.patch @@ -0,0 +1,29 @@ +--- a/tests/hamcrest_unit_test/number/iscloseto_test.py 2022-09-05 16:04:56.568203720 +0300 ++++ b/tests/hamcrest_unit_test/number/iscloseto_test.py 2022-09-05 16:14:06.813885281 +0300 +@@ -64,7 +64,7 @@ + class IsNumericTest(unittest.TestCase): + @unittest.skipUnless(NUMPY_AVAILABLE, "Skipped because it needs NumPy") + def test_numpy_numeric_type_int(self): +- self.assertTrue(isnumeric(np.int(1)), "Platform integer (normally either int32 or int64)") ++ self.assertTrue(isnumeric(np.int_(1)), "Platform integer (normally either int32 or int64)") + + @unittest.skipUnless(NUMPY_AVAILABLE, "Skipped because it needs NumPy") + def test_numpy_numeric_type_int8(self): +@@ -102,7 +102,7 @@ + + @unittest.skipUnless(NUMPY_AVAILABLE, "Skipped because it needs NumPy") + def test_numpy_numeric_type_float(self): +- self.assertTrue(isnumeric(np.float(1)), "Shorthand for float64.") ++ self.assertTrue(isnumeric(np.float_(1)), "Shorthand for float64.") + + @unittest.skipUnless(NUMPY_AVAILABLE, "Skipped because it needs NumPy") + def test_numpy_numeric_type_float16(self): +@@ -127,7 +127,7 @@ + + @unittest.skipUnless(NUMPY_AVAILABLE, "Skipped because it needs NumPy") + def test_numpy_numeric_type_complex(self): +- self.assertTrue(isnumeric(np.complex(1)), "Shorthand for complex128.") ++ self.assertTrue(isnumeric(np.complex_(1)), "Shorthand for complex128.") + + @unittest.skipUnless(NUMPY_AVAILABLE, "Skipped because it needs NumPy") + def test_numpy_numeric_type_complex64(self): diff --git a/SPECS/python-hamcrest.spec b/SPECS/python-hamcrest.spec new file mode 100644 index 0000000..7ffc6f2 --- /dev/null +++ b/SPECS/python-hamcrest.spec @@ -0,0 +1,153 @@ +%global modname hamcrest +%global origname PyHamcrest + +Name: python-%{modname} +Version: 2.0.3 +Release: 8%{?dist} +Summary: Hamcrest matchers for Python + +License: BSD-3-Clause +URL: https://github.com/hamcrest/PyHamcrest +Source0: %{url}/archive/V%{version}/%{name}-%{version}.tar.gz + +# https://numpy.org/devdocs/release/1.20.0-notes.html#using-the-aliases-of-builtin-types-like-np-int-is-deprecated +# https://github.com/hamcrest/PyHamcrest/pull/218 +Patch0: numpy-1.20.0-alias-depr.patch + +BuildArch: noarch + +BuildRequires: python3-devel +BuildRequires: python3-numpy +BuildRequires: python3-pytest +BuildRequires: python3-pytest-xdist + +%global _description \ +PyHamcrest is a framework for writing matcher objects, allowing you to\ +declaratively define "match" rules. There are a number of situations where\ +matchers are invaluable, such as UI validation, or data filtering, but it is\ +in the area of writing flexible tests that matchers are most commonly used. + +%description %{_description} + +%package -n python3-%{modname} +Summary: %{summary} + +%description -n python3-%{modname} %{_description} + +Python 3 version. + +%prep +%autosetup -n %{origname}-%{version} -p1 + +%generate_buildrequires +%pyproject_buildrequires + +%build +%pyproject_wheel + +%install +%pyproject_install +%pyproject_save_files %{modname} + +%check +%pytest -v + +%files -n python3-%{modname} -f %{pyproject_files} + +%changelog +* Sun Jan 05 2025 Arkady L. Shane - 2.0.3-8 +- Rebuilt for MSVSphere 10 + +* Fri Jul 19 2024 Fedora Release Engineering - 2.0.3-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Sat Jun 08 2024 Python Maint - 2.0.3-7 +- Rebuilt for Python 3.13 + +* Fri Jan 26 2024 Fedora Release Engineering - 2.0.3-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Mon Jan 22 2024 Fedora Release Engineering - 2.0.3-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Fri Jul 21 2023 Fedora Release Engineering - 2.0.3-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Wed Jun 14 2023 Python Maint - 2.0.3-3 +- Rebuilt for Python 3.12 + +* Fri Jan 20 2023 Fedora Release Engineering - 2.0.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Mon Sep 05 2022 Ali Erdinc Koroglu - 2.0.3-1 +- Update to 2.0.3 (RHBZ #1788673) + +* Fri Jul 22 2022 Fedora Release Engineering - 1.9.0-21 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Mon Jun 13 2022 Python Maint - 1.9.0-20 +- Rebuilt for Python 3.11 + +* Fri Jan 21 2022 Fedora Release Engineering - 1.9.0-19 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Fri Jul 23 2021 Fedora Release Engineering - 1.9.0-18 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Fri Jun 04 2021 Python Maint - 1.9.0-17 +- Rebuilt for Python 3.10 + +* Wed Jan 27 2021 Fedora Release Engineering - 1.9.0-16 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Wed Jul 29 2020 Fedora Release Engineering - 1.9.0-15 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Sun May 24 2020 Miro Hrončok - 1.9.0-14 +- Rebuilt for Python 3.9 + +* Thu Jan 30 2020 Fedora Release Engineering - 1.9.0-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Sun Oct 20 2019 Miro Hrončok - 1.9.0-12 +- Subpackage python2-hamcrest has been removed + See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal + +* Thu Oct 03 2019 Miro Hrončok - 1.9.0-11 +- Rebuilt for Python 3.8.0rc1 (#1748018) + +* Sat Aug 17 2019 Miro Hrončok - 1.9.0-10 +- Rebuilt for Python 3.8 + +* Fri Jul 26 2019 Fedora Release Engineering - 1.9.0-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Sat Feb 02 2019 Fedora Release Engineering - 1.9.0-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Sat Jul 14 2018 Fedora Release Engineering - 1.9.0-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Tue Jun 19 2018 Miro Hrončok - 1.9.0-6 +- Rebuilt for Python 3.7 + +* Fri Feb 09 2018 Fedora Release Engineering - 1.9.0-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Thu Jul 27 2017 Fedora Release Engineering - 1.9.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Sat Feb 11 2017 Fedora Release Engineering - 1.9.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Mon Dec 19 2016 Miro Hrončok - 1.9.0-2 +- Rebuild for Python 3.6 + +* Mon Oct 03 2016 Igor Gnatenko - 1.9.0-1 +- Update to 1.9.0 + +* Sun Aug 21 2016 Igor Gnatenko - 1.8.5-2 +- Backport couple of upstream patches + +* Fri Aug 19 2016 Igor Gnatenko - 1.8.5-1 +- Initial package