commit: 26f39f2f8320556c2515ac88643e338757d9c9d3
Author: Michał Górny gentoo org>
AuthorDate: Fri Jun 14 14:43:57 2024 +
Commit: Michał Górny gentoo org>
CommitDate: Fri Jun 14 15:07:12 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=26f39f2f
dev-python/scikit-build: Fix tests
Thanks to arkamar for digging the patch up.
Closes: https://bugs.gentoo.org/933655
Signed-off-by: Michał Górny gentoo.org>
.../scikit-build-0.17.6-setuptools-69.3.patch | 164 +
dev-python/scikit-build/scikit-build-0.17.6.ebuild | 13 +-
2 files changed, 175 insertions(+), 2 deletions(-)
diff --git
a/dev-python/scikit-build/files/scikit-build-0.17.6-setuptools-69.3.patch
b/dev-python/scikit-build/files/scikit-build-0.17.6-setuptools-69.3.patch
new file mode 100644
index ..ce5121bea72f
--- /dev/null
+++ b/dev-python/scikit-build/files/scikit-build-0.17.6-setuptools-69.3.patch
@@ -0,0 +1,164 @@
+From acee12430753e8350435d4304196e8eaa654ccd6 Mon Sep 17 00:00:00 2001
+From: Steve Kowalik
+Date: Mon, 3 Jun 2024 20:47:20 +1000
+Subject: [PATCH] Support setuptools 69.3.0 changes in four tests
+
+setuptools 69.3.0 now canonicalizes package names in filenames, which
+means all dashes are now converted to underscores, leading to test
+failures due to FileNotFoundErrors. Handle both cases to support older
+and newer setuptools.
+---
+ tests/test_hello_cython.py | 23 ++-
+ tests/test_hello_fortran.py | 29 +
+ tests/test_hello_pure.py| 15 ++-
+ tests/test_manifest_in.py | 17 +++--
+ 4 files changed, 52 insertions(+), 32 deletions(-)
+
+diff --git a/tests/test_hello_cython.py b/tests/test_hello_cython.py
+index dc95f697..1d9e944d 100644
+--- a/tests/test_hello_cython.py
b/tests/test_hello_cython.py
+@@ -29,20 +29,25 @@ def test_hello_cython_sdist():
+ sdists_zip = glob.glob("dist/*.zip")
+ assert sdists_tar or sdists_zip
+
++dirname = "hello-cython-1.2.3"
++# setuptools 69.3.0 and above now canonicalize the filename as well.
++if any("hello_cython" in x for x in sdists_zip + sdists_tar):
++dirname = "hello_cython-1.2.3"
++
+ expected_content = [
+-"hello-cython-1.2.3/CMakeLists.txt",
+-"hello-cython-1.2.3/hello/_hello.pyx",
+-"hello-cython-1.2.3/hello/CMakeLists.txt",
+-"hello-cython-1.2.3/hello/__init__.py",
+-"hello-cython-1.2.3/hello/__main__.py",
+-"hello-cython-1.2.3/setup.py",
++f"{dirname}/CMakeLists.txt",
++f"{dirname}/hello/_hello.pyx",
++f"{dirname}/hello/CMakeLists.txt",
++f"{dirname}/hello/__init__.py",
++f"{dirname}/hello/__main__.py",
++f"{dirname}/setup.py",
+ ]
+
+-sdist_archive = "dist/hello-cython-1.2.3.zip"
++sdist_archive = f"dist/{dirname}.zip"
+ if sdists_tar:
+-sdist_archive = "dist/hello-cython-1.2.3.tar.gz"
++sdist_archive = f"dist/{dirname}.tar.gz"
+
+-check_sdist_content(sdist_archive, "hello-cython-1.2.3",
expected_content, package_dir="hello")
++check_sdist_content(sdist_archive, dirname, expected_content,
package_dir="hello")
+
+
+ @project_setup_py_test("hello-cython", ["bdist_wheel"])
+diff --git a/tests/test_hello_fortran.py b/tests/test_hello_fortran.py
+index 41f5f444..be9cede9 100644
+--- a/tests/test_hello_fortran.py
b/tests/test_hello_fortran.py
+@@ -33,23 +33,28 @@ def test_hello_fortran_sdist():
+ sdists_zip = glob.glob("dist/*.zip")
+ assert sdists_tar or sdists_zip
+
++dirname = "hello-fortran-1.2.3"
++# setuptools 69.3.0 and above now canonicalize the filename as well.
++if any("hello_fortran" in x for x in sdists_zip + sdists_tar):
++dirname = "hello_fortran-1.2.3"
++
+ expected_content = [
+-"hello-fortran-1.2.3/bonjour/_bonjour.f90",
+-"hello-fortran-1.2.3/bonjour/_bonjour.pyf",
+-"hello-fortran-1.2.3/bonjour/CMakeLists.txt",
+-"hello-fortran-1.2.3/CMakeLists.txt",
+-"hello-fortran-1.2.3/hello/_hello.f90",
+-"hello-fortran-1.2.3/hello/CMakeLists.txt",
+-"hello-fortran-1.2.3/hello/__init__.py",
+-"hello-fortran-1.2.3/hello/__main__.py",
+-"hello-fortran-1.2.3/setup.py",
++f"{dirname}/bonjour/_bonjour.f90",
++f"{dirname}/bonjour/_bonjour.pyf",
++f"{dirname}/bonjour/CMakeLists.txt",
++f"{dirname}/CMakeLists.txt",
++f"{dirname}/hello/_hello.f90",
++f"{dirname}/hello/CMakeLists.txt",
++f"{dirname}/hello/__init__.py",
++f"{dirname}/hello/__main__.py",
++f"{dirname}/setup.py",
+ ]
+
+-sdist_archive = "dist/hello-fortran-1.2.3.zip"
++sdist_archive = f"dist/{dirname}.zip"
+ if sdists_tar:
+-sdist_archive = "dist/hello-fortran-1.2.3.tar.gz"
++sdist_archive = f"dist/{dirname}.tar.gz"
+
+-check_sdist_content(sdist_archive, "hello-fortran-1.2.3",