Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: avoid interfering with other setuptools plugins #414

Merged
merged 2 commits into from
Jun 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/scikit_build_core/setuptools/build_cmake.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,8 @@ def _has_cmake(dist: Distribution) -> bool:
def _prepare_extension_detection(dist: Distribution) -> None:
# Setuptools needs to know that it has extensions modules

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

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