Skip to content

Conversation

@mgorny
Copy link
Contributor

@mgorny mgorny commented Feb 10, 2025

Replace the unconditional build requirement of cmake with one that is added only if system CMake is not available, in order to facilitate building against system CMake when available. This avoids unnecessary dependency on some systems, and improves portability when the particular target requires downstream patching of CMake.

While at it, also update the existing CMake check to use shutil.which() which is more efficient than spawning a subprocess, and update the error message to reference matching CMake version.

Replace the unconditional build requirement of `cmake` with one that
is added only if system CMake is not available, in order to facilitate
building against system CMake when available.  This avoids unnecessary
dependency on some systems, and improves portability when the particular
target requires downstream patching of CMake.

While at it, also update the existing CMake check to use
`shutil.which()` which is more efficient than spawning a subprocess,
and update the error message to reference matching CMake version.
@jmalkin
Copy link
Contributor

jmalkin commented Feb 10, 2025

This is reasonable. Thanks for contributing it! I was about to work on a new python release to incorporate a bugfix from c++, so good timing, too.

@jmalkin jmalkin merged commit 2f5c54d into apache:main Feb 10, 2025
3 checks passed
@mgorny mgorny deleted the sys-cmake branch February 11, 2025 06:36
@mgorny
Copy link
Contributor Author

mgorny commented Feb 11, 2025

Thanks!

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.

2 participants