[packages/python3-importlib_resources] - tests fix (no idea why they worked for me); don't package tests
qboosh
qboosh at pld-linux.org
Sun Nov 30 16:14:04 CET 2025
commit 8c00ad328f03916409b0f68c26d70a1025aed1c1
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sun Nov 30 16:14:10 2025 +0100
- tests fix (no idea why they worked for me); don't package tests
importlib_resources-tests.patch | 10 ++++++++++
python3-importlib_resources.spec | 5 +++++
2 files changed, 15 insertions(+)
---
diff --git a/python3-importlib_resources.spec b/python3-importlib_resources.spec
index 94573cc..6a0fffe 100644
--- a/python3-importlib_resources.spec
+++ b/python3-importlib_resources.spec
@@ -13,6 +13,7 @@ Group: Libraries/Python
#Source0Download: https://pypi.org/simple/importlib-resources/
Source0: https://files.pythonhosted.org/packages/source/i/importlib-resources/importlib_resources-%{version}.tar.gz
# Source0-md5: 6ba34e0f24dc7521a5e44e707ed0f28f
+Patch0: importlib_resources-tests.patch
URL: https://pypi.org/project/importlib-resources/
BuildRequires: python3-modules >= 1:3.9
BuildRequires: python3-setuptools >= 1:61.2
@@ -30,6 +31,7 @@ BuildRequires: python3-pytest >= 6
#BuildRequires: python3-pytest-mypy >= 0.9.1
#BuildRequires: python3-pytest-ruff >= 0.2.1
#BuildRequires: python3-ruff
+BuildRequires: python3-test >= 1:3.9
BuildRequires: python3-zipp >= 3.17
%endif
BuildRequires: rpm-pythonprov
@@ -82,6 +84,7 @@ Dokumentacja API modułu Pythona importlib_resources.
%prep
%setup -q -n importlib_resources-%{version}
+%patch -P0 -p1
cat >setup.py <<EOF
from setuptools import setup
@@ -104,6 +107,8 @@ rm -rf $RPM_BUILD_ROOT
%py3_install
+%{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/importlib_resources/tests
+
%clean
rm -rf $RPM_BUILD_ROOT
diff --git a/importlib_resources-tests.patch b/importlib_resources-tests.patch
new file mode 100644
index 0000000..19bf474
--- /dev/null
+++ b/importlib_resources-tests.patch
@@ -0,0 +1,10 @@
+--- importlib_resources-6.5.2/importlib_resources/tests/util.py.orig 2025-01-03 19:51:36.000000000 +0100
++++ importlib_resources-6.5.2/importlib_resources/tests/util.py 2025-11-30 14:47:59.855826299 +0100
+@@ -2,6 +2,7 @@ import abc
+ import contextlib
+ import functools
+ import importlib
++import importlib.abc
+ import io
+ import pathlib
+ import sys
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python3-importlib_resources.git/commitdiff/8c00ad328f03916409b0f68c26d70a1025aed1c1
More information about the pld-cvs-commit
mailing list