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

Depend on cmake only if there is no system package #932

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mgorny
Copy link

@mgorny mgorny commented Jan 16, 2025

Rather than requiring using cmake from PyPI unconditionally, check if cmake is available on the system, and add the dependency only if it is not. This is the same approach as used e.g. by scikit-build-core build system. Besides avoiding unnecessarily installing (or building) a second copy of CMake, it improves portability, as system CMake is often patched downstream whereas the CMake version found on PyPI is not.

Rather than requiring using `cmake` from PyPI unconditionally, check
if `cmake` is available on the system, and add the dependency only
if it is not.  This is the same approach as used e.g. by
`scikit-build-core` build system.  Besides avoiding unnecessarily
installing (or building) a second copy of CMake, it improves
portability, as system CMake is often patched downstream whereas
the CMake version found on PyPI is not.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant