1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
|
diff --git a/skbuild/platform_specifics/windows.py b/skbuild/platform_specifics/windows.py
index 01085a3c..144dec81 100644
--- a/skbuild/platform_specifics/windows.py
+++ b/skbuild/platform_specifics/windows.py
@@ -215,7 +215,7 @@ def _get_msvc_compiler_env(vs_version: int, vs_toolset: str | None = None) -> Ca
return __get_msvc_compiler_env_cache[cache_key]
if hasattr(monkey, "patch_for_msvc_specialized_compiler"):
- monkey.patch_for_msvc_specialized_compiler() # type: ignore[no-untyped-call]
+ monkey.patch_for_msvc_specialized_compiler()
vc_dir = find_visual_studio(vs_version)
vcvarsall = os.path.join(vc_dir, "vcvarsall.bat")
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..381a67be 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 is not None, "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.
|