Skip to content

Commit fd9e6cf

Browse files
fix: avoid interfering with other setuptools plugins (#414)
Fix #413. --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 81f83b6 commit fd9e6cf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/scikit_build_core/setuptools/build_cmake.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,8 @@ def _has_cmake(dist: Distribution) -> bool:
182182
def _prepare_extension_detection(dist: Distribution) -> None:
183183
# Setuptools needs to know that it has extensions modules
184184

185-
dist.has_ext_modules = lambda: type(dist).has_ext_modules(dist) or _has_cmake(dist) # type: ignore[method-assign]
185+
orig_has_ext_modules = dist.has_ext_modules
186+
dist.has_ext_modules = lambda: orig_has_ext_modules() or _has_cmake(dist) # type: ignore[method-assign]
186187

187188
# Hack for stdlib distutils
188189
if not setuptools.distutils.__package__.startswith("setuptools"): # type: ignore[attr-defined]

0 commit comments

Comments
 (0)