commit: 80a44b4c59e1022816ff28156ff60ddaa65b1866 Author: Michał Górny <mgorny <AT> gentoo <DOT> org> AuthorDate: Thu Mar 6 17:58:28 2025 +0000 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> CommitDate: Thu Mar 6 19:01:07 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=80a44b4c
dev-python/scikit-build: Backport setuptools-related test fixes Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> .../files/scikit-build-0.18.1-setuptools-75.patch | 42 ++++++++++++++++++++++ dev-python/scikit-build/scikit-build-0.18.1.ebuild | 7 +++- 2 files changed, 48 insertions(+), 1 deletion(-) diff --git a/dev-python/scikit-build/files/scikit-build-0.18.1-setuptools-75.patch b/dev-python/scikit-build/files/scikit-build-0.18.1-setuptools-75.patch new file mode 100644 index 000000000000..033b98fd2c58 --- /dev/null +++ b/dev-python/scikit-build/files/scikit-build-0.18.1-setuptools-75.patch @@ -0,0 +1,42 @@ +From 3992485c67331097553ec8f54233c4c295943f70 Mon Sep 17 00:00:00 2001 +From: Henry Schreiner <[email protected]> +Date: Mon, 30 Sep 2024 13:12:38 -0400 +Subject: [PATCH 1/4] fix(types): Update for newer setuptools + +Signed-off-by: Henry Schreiner <[email protected]> +--- + skbuild/setuptools_wrap.py | 2 +- + tests/__init__.py | 6 +++++- + 3 files changed, 7 insertions(+), 3 deletions(-) + +diff --git a/skbuild/setuptools_wrap.py b/skbuild/setuptools_wrap.py +index 8e59631b..f6c60cd5 100644 +--- a/skbuild/setuptools_wrap.py ++++ b/skbuild/setuptools_wrap.py +@@ -250,7 +250,7 @@ def _parse_setuptools_arguments( + + return ( + display_only, +- dist.help_commands, # type: ignore[attr-defined] ++ bool(dist.help_commands), + dist.commands, + dist.hide_listing, # type: ignore[attr-defined] + dist.force_cmake, # type: ignore[attr-defined] +diff --git a/tests/__init__.py b/tests/__init__.py +index 4f3c9543..e3942246 100644 +--- a/tests/__init__.py ++++ b/tests/__init__.py +@@ -215,7 +215,11 @@ def execute_setup_py(project_dir, setup_args, disable_languages_test=False): + """ + + # See https://stackoverflow.com/questions/9160227/dir-util-copy-tree-fails-after-shutil-rmtree +- distutils.dir_util._path_created.clear() # type: ignore[attr-defined] ++ to_clear = getattr( ++ distutils.dir_util, "SkipRepeatAbsolutePaths", getattr(distutils.dir_util, "_path_created", None) ++ ) ++ assert to_clear, "Must have one of the two supported clearing mechanisms" ++ to_clear.clear() + + # Clear _PYTHON_HOST_PLATFORM to ensure value sets in skbuild.setuptools_wrap.setup() does not + # influence other tests. + diff --git a/dev-python/scikit-build/scikit-build-0.18.1.ebuild b/dev-python/scikit-build/scikit-build-0.18.1.ebuild index 8a119d956bc9..b325733a05f9 100644 --- a/dev-python/scikit-build/scikit-build-0.18.1.ebuild +++ b/dev-python/scikit-build/scikit-build-0.18.1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -48,6 +48,11 @@ distutils_enable_sphinx docs \ distutils_enable_tests pytest src_prepare() { + local PATCHES=( + # https://github.com/scikit-build/scikit-build/pull/1120 + "${FILESDIR}/${P}-setuptools-75.patch" + ) + # not packaged sed -i -e '/cmakedomain/d' docs/conf.py || die distutils-r1_src_prepare
