From 98dd97db13f93dd44929b3f10ef2e9db1d38049c Mon Sep 17 00:00:00 2001 From: tigro Date: Sat, 4 Jan 2025 23:06:03 +0300 Subject: [PATCH] import python-frozenlist-1.4.1-6.el10 --- .gitignore | 1 + .python-frozenlist.metadata | 1 + ...am-only-Build-normal-wheels-in-place.patch | 29 ++++ .../Skip-some-attributes-when-testing.patch | 25 +++ SPECS/python-frozenlist.spec | 160 ++++++++++++++++++ 5 files changed, 216 insertions(+) create mode 100644 .gitignore create mode 100644 .python-frozenlist.metadata create mode 100644 SOURCES/0001-Downstream-only-Build-normal-wheels-in-place.patch create mode 100644 SOURCES/Skip-some-attributes-when-testing.patch create mode 100644 SPECS/python-frozenlist.spec diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..eb72635 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/frozenlist-1.4.1.tar.gz diff --git a/.python-frozenlist.metadata b/.python-frozenlist.metadata new file mode 100644 index 0000000..0bdc8dc --- /dev/null +++ b/.python-frozenlist.metadata @@ -0,0 +1 @@ +5b8244218abdaa2bda846c8c083e8ac286cea660 SOURCES/frozenlist-1.4.1.tar.gz diff --git a/SOURCES/0001-Downstream-only-Build-normal-wheels-in-place.patch b/SOURCES/0001-Downstream-only-Build-normal-wheels-in-place.patch new file mode 100644 index 0000000..d4277d9 --- /dev/null +++ b/SOURCES/0001-Downstream-only-Build-normal-wheels-in-place.patch @@ -0,0 +1,29 @@ +From 57cedf60030c16a64fd988376de230652edce1fa Mon Sep 17 00:00:00 2001 +From: "Benjamin A. Beasley" +Date: Fri, 15 Dec 2023 08:11:45 -0500 +Subject: [PATCH] Downstream-only: Build normal wheels in-place + +Upstream wants to build only editable wheels in-place, building normal +wheels in a temporary directory. This is reasonable in principle, but +the implementation conflicts with the pyproject-rpm-macros, resulting in +an unbounded recursion of nested temporary directories. +--- + packaging/pep517_backend/_backend.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/packaging/pep517_backend/_backend.py b/packaging/pep517_backend/_backend.py +index 8bb2ee2..e640738 100644 +--- a/packaging/pep517_backend/_backend.py ++++ b/packaging/pep517_backend/_backend.py +@@ -286,7 +286,7 @@ def build_wheel( + """ + with maybe_prebuild_c_extensions( + line_trace_cython_when_unset=False, +- build_inplace=False, ++ build_inplace=True, + config_settings=config_settings, + ): + return _setuptools_build_wheel( +-- +2.43.0 + diff --git a/SOURCES/Skip-some-attributes-when-testing.patch b/SOURCES/Skip-some-attributes-when-testing.patch new file mode 100644 index 0000000..b466b0e --- /dev/null +++ b/SOURCES/Skip-some-attributes-when-testing.patch @@ -0,0 +1,25 @@ +From c6e8550ff462a6e299df35a935d2ffbf2777894e Mon Sep 17 00:00:00 2001 +From: Karolina Surma +Date: Thu, 30 May 2024 10:46:25 +0200 +Subject: [PATCH] Skip some attributes when testing + +--- + tests/test_frozenlist.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/test_frozenlist.py b/tests/test_frozenlist.py +index 403d3ec..90ea84b 100644 +--- a/tests/test_frozenlist.py ++++ b/tests/test_frozenlist.py +@@ -11,7 +11,7 @@ from frozenlist import FrozenList, PyFrozenList + class FrozenListMixin: + FrozenList = NotImplemented + +- SKIP_METHODS = {"__abstractmethods__", "__slots__"} ++ SKIP_METHODS = {"__abstractmethods__", "__slots__", "__static_attributes__", "__firstlineno__"} + + def test_subclass(self) -> None: + assert issubclass(self.FrozenList, MutableSequence) +-- +2.44.0 + diff --git a/SPECS/python-frozenlist.spec b/SPECS/python-frozenlist.spec new file mode 100644 index 0000000..8b97db2 --- /dev/null +++ b/SPECS/python-frozenlist.spec @@ -0,0 +1,160 @@ +## START: Set by rpmautospec +## (rpmautospec version 0.6.5) +## RPMAUTOSPEC: autorelease, autochangelog +%define autorelease(e:s:pb:n) %{?-p:0.}%{lua: + release_number = 6; + base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); + print(release_number + base_release_number - 1); +}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} +## END: Set by rpmautospec + +Name: python-frozenlist +Version: 1.4.1 +Release: %autorelease +Summary: List-like structure which can be made immutable + +License: Apache-2.0 +URL: https://github.com/aio-libs/frozenlist +Source: %{pypi_source frozenlist} + +# Downstream-only: Build normal wheels in-place +# +# Upstream wants to build only editable wheels in-place, building normal +# wheels in a temporary directory. This is reasonable in principle, but +# the implementation conflicts with the pyproject-rpm-macros, resulting in +# an unbounded recursion of nested temporary directories. +Patch: 0001-Downstream-only-Build-normal-wheels-in-place.patch + +# Work around the failing test in Python 3.13+ - skip the new +# __static_attributes__ and __firstlineno__ methods +# Reported upstream: https://github.com/aio-libs/frozenlist/issues/588 +Patch: Skip-some-attributes-when-testing.patch + +BuildRequires: python3-devel + +BuildRequires: gcc + +BuildRequires: %{py3_dist pytest} + +%global common_description %{expand: +FrozenList is a list-like structure which implements +collections.abc.MutableSequence, and which can be made immutable.} + +%description %{common_description} + + +%package -n python3-frozenlist +Summary: %{summary} + +%description -n python3-frozenlist %{common_description} + + +%prep +%autosetup -n frozenlist-%{version} -p1 + +# Remove Cython-generated sources; we must ensure they are regenerated. +find . -type f -name '*.c' -print -delete + +# Patch out coverage-related pytest options: +# https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_linters +sed -r -i 's/^([[:blank:]]*)(.*[-_]cov)/\1# \2/' pytest.ini + + +%generate_buildrequires +%pyproject_buildrequires + + +%build +%pyproject_wheel + + +%install +%pyproject_install +%pyproject_save_files -l frozenlist + + +%check +%pytest -v + + +%files -n python3-frozenlist -f %{pyproject_files} +%doc CHANGES.rst +%doc CONTRIBUTORS.txt +%doc README.rst + + +%changelog +* Sat Jan 04 2025 Arkady L. Shane - 1.4.1-6 +- Rebuilt for MSVSphere 10 + +## START: Generated by rpmautospec +* Fri Jul 19 2024 Fedora Release Engineering - 1.4.1-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Fri Jun 07 2024 Python Maint - 1.4.1-5 +- Rebuilt for Python 3.13 + +* Thu May 30 2024 Karolina Surma - 1.4.1-4 +- Fix compatibility with Python 3.13+ + +* Fri Jan 26 2024 Fedora Release Engineering - 1.4.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Mon Jan 22 2024 Fedora Release Engineering - 1.4.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Mon Dec 18 2023 Benjamin A. Beasley - 1.4.1-1 +- Update to 1.4.1 (close RHBZ#2254700) +- Drop the -doc subpackage due to missing new dependencies + +* Mon Dec 18 2023 Benjamin A. Beasley - 1.4.0-3 +- Assert that %%pyproject_files contains a license file + +* Fri Jul 21 2023 Fedora Release Engineering - 1.4.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Thu Jul 13 2023 Benjamin A. Beasley - 1.4.0-1 +- Update to 1.4.0 (close RHBZ#2222472) + +* Tue Jul 11 2023 Benjamin A. Beasley - 1.3.3-7 +- When PDF docs are disabled, omit the -doc subpackage + +* Fri Jul 07 2023 Benjamin A. Beasley - 1.3.3-6 +- Use new (rpm 4.17.1+) bcond style + +* Wed Jun 14 2023 Python Maint - 1.3.3-5 +- Rebuilt for Python 3.12 + +* Fri Mar 17 2023 Benjamin A. Beasley - 1.3.3-3 +- Don’t assume %%_smp_mflags is -j%%_smp_build_ncpus + +* Fri Jan 20 2023 Fedora Release Engineering - 1.3.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Thu Nov 10 2022 Benjamin A. Beasley - 1.3.3-1 +- Update to 1.3.3 (close RHBZ#2141069) + +* Wed Aug 03 2022 Benjamin A. Beasley - 1.3.1-1 +- Update to 1.3.1 (close RHBZ#2114752) + +* Wed Aug 03 2022 Benjamin A. Beasley - 1.3.0-5 +- Convert License to SPDX (ASL 2.0 becomes Apache-2.0) + +* Fri Jul 22 2022 Fedora Release Engineering - 1.3.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Mon Jun 13 2022 Python Maint - 1.3.0-3 +- Rebuilt for Python 3.11 + +* Fri Jan 21 2022 Fedora Release Engineering - 1.3.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Tue Jan 18 2022 Benjamin A. Beasley - 1.3.0-1 +- Update to 1.3.0 (fix RHBZ#2041998) + +* Fri Jan 07 2022 Benjamin A. Beasley - 1.2.0-2 +- Drop intersphinx mappings + +* Mon Dec 13 2021 Benjamin A. Beasley - 1.2.0-1 +- Initial package (close RHBZ#2029651) +## END: Generated by rpmautospec