| 1 | from https://github.com/scikit-build/scikit-build/commit/3992485c67331097553ec8f54233c4c295943f70.patch
|
| 2 |
|
| 3 | Description: fix(types): Update for newer setuptools
|
| 4 |
|
| 5 | Author: Henry Schreiner <[email protected]>
|
| 6 | ---
|
| 7 | skbuild/platform_specifics/windows.py | 2 +-
|
| 8 | skbuild/setuptools_wrap.py | 2 +-
|
| 9 | tests/__init__.py | 6 +++++-
|
| 10 | 3 files changed, 7 insertions(+), 3 deletions(-)
|
| 11 |
|
| 12 | diff --git a/skbuild/platform_specifics/windows.py b/skbuild/platform_specifics/windows.py
|
| 13 | index 01085a3c..144dec81 100644
|
| 14 | |
| 15 | |
| 16 | @@ -215,7 +215,7 @@ def _get_msvc_compiler_env(vs_version: int, vs_toolset: str | None = None) -> Ca
|
| 17 | return __get_msvc_compiler_env_cache[cache_key]
|
| 18 |
|
| 19 | if hasattr(monkey, "patch_for_msvc_specialized_compiler"):
|
| 20 | - monkey.patch_for_msvc_specialized_compiler() # type: ignore[no-untyped-call]
|
| 21 | + monkey.patch_for_msvc_specialized_compiler()
|
| 22 |
|
| 23 | vc_dir = find_visual_studio(vs_version)
|
| 24 | vcvarsall = os.path.join(vc_dir, "vcvarsall.bat")
|
| 25 | diff --git a/skbuild/setuptools_wrap.py b/skbuild/setuptools_wrap.py
|
| 26 | index 8e59631b..f6c60cd5 100644
|
| 27 | |
| 28 | |
| 29 | @@ -250,7 +250,7 @@ def _parse_setuptools_arguments(
|
| 30 |
|
| 31 | return (
|
| 32 | display_only,
|
| 33 | - dist.help_commands, # type: ignore[attr-defined]
|
| 34 | + bool(dist.help_commands),
|
| 35 | dist.commands,
|
| 36 | dist.hide_listing, # type: ignore[attr-defined]
|
| 37 | dist.force_cmake, # type: ignore[attr-defined]
|
| 38 | diff --git a/tests/__init__.py b/tests/__init__.py
|
| 39 | index 4f3c9543..e3942246 100644
|
| 40 | |
| 41 | |
| 42 | @@ -215,7 +215,11 @@ def execute_setup_py(project_dir, setup_args, disable_languages_test=False):
|
| 43 | """
|
| 44 |
|
| 45 | # See https://stackoverflow.com/questions/9160227/dir-util-copy-tree-fails-after-shutil-rmtree
|
| 46 | - distutils.dir_util._path_created.clear() # type: ignore[attr-defined]
|
| 47 | + to_clear = getattr(
|
| 48 | + distutils.dir_util, "SkipRepeatAbsolutePaths", getattr(distutils.dir_util, "_path_created", None)
|
| 49 | + )
|
| 50 | + assert to_clear, "Must have one of the two supported clearing mechanisms"
|
| 51 | + to_clear.clear()
|
| 52 |
|
| 53 | # Clear _PYTHON_HOST_PLATFORM to ensure value sets in skbuild.setuptools_wrap.setup() does not
|
| 54 | # influence other tests.
|