commit 53139e9459e8b7c8d2f0892c6bc2c495ab6035eb Author: MSVSphere Packaging Team Date: Fri Oct 25 18:41:48 2024 +0300 import python-installer-0.7.0-7.el10 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b6710ee --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/installer-0.7.0.tar.gz diff --git a/.python-installer.metadata b/.python-installer.metadata new file mode 100644 index 0000000..9e59876 --- /dev/null +++ b/.python-installer.metadata @@ -0,0 +1 @@ +59bbffec808610077fe3ad183b9734b68ca5bc2d SOURCES/installer-0.7.0.tar.gz diff --git a/SOURCES/Fix-removed-importlib.resources.read_binary-in-Pytho.patch b/SOURCES/Fix-removed-importlib.resources.read_binary-in-Pytho.patch new file mode 100644 index 0000000..95abd6d --- /dev/null +++ b/SOURCES/Fix-removed-importlib.resources.read_binary-in-Pytho.patch @@ -0,0 +1,38 @@ +From 28f0a1a5ed9d33567353ec930cf4702c2bc86886 Mon Sep 17 00:00:00 2001 +From: Karolina Surma +Date: Thu, 11 Jan 2024 10:33:54 +0100 +Subject: [PATCH] Fix removed importlib.resources.read_binary in Python 3.13 + +--- + src/installer/scripts.py | 14 ++++++++++++-- + 1 files changed, 16 insertions(+), 2 deletions(-) + +diff --git a/src/installer/scripts.py b/src/installer/scripts.py +index 7e3c8fc..a70c59f 100644 +--- a/src/installer/scripts.py ++++ b/src/installer/scripts.py +@@ -2,9 +2,19 @@ + + import io + import shlex ++import sys + import zipfile +-from importlib.resources import read_binary +-from typing import TYPE_CHECKING, Mapping, Optional, Tuple ++from types import ModuleType ++from typing import TYPE_CHECKING, Mapping, Optional, Tuple, Union ++ ++if sys.version_info >= (3, 9): # pragma: no cover ++ from importlib.resources import files ++ ++ def read_binary(package: Union[str, ModuleType], file_path: str) -> bytes: ++ return (files(package) / file_path).read_bytes() ++ ++else: # pragma: no cover ++ from importlib.resources import read_binary + + from installer import _scripts + +-- +2.43.0 + diff --git a/SPECS/python-installer.spec b/SPECS/python-installer.spec new file mode 100644 index 0000000..fe9c141 --- /dev/null +++ b/SPECS/python-installer.spec @@ -0,0 +1,88 @@ +Name: python-installer +Version: 0.7.0 +Release: 7%{?dist} +Summary: A library for installing Python wheels + +# SPDX +License: MIT +URL: https://github.com/pypa/installer +Source: %{pypi_source installer} + +# Fix the build with Python 3.13 - merged upstream +# https://github.com/pypa/installer/commit/b23f89b10cf5 +Patch: Fix-removed-importlib.resources.read_binary-in-Pytho.patch + +BuildArch: noarch +BuildRequires: python3-devel + +# For tests +BuildRequires: python3-pytest + +%global _description %{expand: +This is a low-level library for installing a Python package from +a wheel distribution. It provides basic functionality and abstractions +for handling wheels and installing packages from wheels.} + + +%description %_description + +%package -n python3-installer +Summary: %{summary} + +%description -n python3-installer %_description + + +%prep +%autosetup -p1 -n installer-%{version} + +%generate_buildrequires +%pyproject_buildrequires + + +%build +%pyproject_wheel + + +%install +%pyproject_install +%pyproject_save_files installer + + +%check +%pyproject_check_import +%pytest + + +%files -n python3-installer -f %{pyproject_files} +%license LICENSE +%doc CONTRIBUTING.md README.md + + +%changelog +* Mon Jun 24 2024 Troy Dawson - 0.7.0-7 +- Bump release for June 2024 mass rebuild + +* Fri Jan 26 2024 Fedora Release Engineering - 0.7.0-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Mon Jan 22 2024 Fedora Release Engineering - 0.7.0-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Thu Jan 11 2024 Karolina Surma - 0.7.0-4 +- Fix the build with Python 3.13 +Fixes: rhbz#2246052 + +* Fri Jul 21 2023 Fedora Release Engineering - 0.7.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Tue Jun 13 2023 Python Maint - 0.7.0-2 +- Rebuilt for Python 3.12 + +* Wed Mar 22 2023 Tomáš Hrnčiar - 0.7.0-1 +- Update to 0.7.0 + +* Fri Jan 20 2023 Fedora Release Engineering - 0.5.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Thu Jul 28 2022 Charalampos Stratakis - 0.5.1-1 +- Initial package (rhbz#2111707) \ No newline at end of file