-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Add cmake dependency only when system cmake is not available (backend version) #6643
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
Conversation
Thank you! Do you expect |
The backend is standardized per PEP 517 (and followup PEPs), so |
When you get a chance, could you also signoff the commits following https://github.com/onnx/onnx/pull/6643/checks?check_run_id=35781036009 ? Thanks! |
Yeah, just noticed I didn't do that. Signoff will be there with the update. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6643 +/- ##
=======================================
Coverage 57.46% 57.46%
=======================================
Files 507 507
Lines 31584 31584
Branches 3046 3046
=======================================
Hits 18151 18151
Misses 12607 12607
Partials 826 826 ☔ View full report in Codecov by Sentry. |
Instead of unconditionally pulling `cmake` PyPI package in, check whether `cmake` is available first and add the dependency only when it is not available. This is the same approach as used by the `scikit-build-core` package, and it improves portability, especially given that CMake frequently requires downstream patching to work. In this version of the patch, I've created a minimal PEP517 build backend that inherits the functions provided by setuptools, and adds the CMake dependency when necessary. This avoids using deprecated setuptools `setup_requires` argument, and it avoids adding CMake dependency when building source distributions. Signed-off-by: Michał Górny <mgorny@gentoo.org>
Updated. Added an explanatory docstring, and fixed ruff errors. |
Thank you! |
… version) (#6643) ### Description Instead of unconditionally pulling `cmake` PyPI package in, check whether `cmake` is available first and add the dependency only when it is not available. This is the same approach as used by the `scikit-build-core` package, and it improves portability, especially given that CMake frequently requires downstream patching to work. In this version of the patch, I've created a minimal PEP517 build backend that inherits the functions provided by setuptools, and adds the CMake dependency when necessary. This avoids using deprecated setuptools `setup_requires` argument, and it avoids adding CMake dependency when building source distributions. ### Motivation and Context Same as #6642, except using PEP517 backend instead of deprecated `setup_requires`. Signed-off-by: Michał Górny <mgorny@gentoo.org> Signed-off-by: Andreas Fehlner <fehlner@arcor.de>
… version) (onnx#6643) ### Description Instead of unconditionally pulling `cmake` PyPI package in, check whether `cmake` is available first and add the dependency only when it is not available. This is the same approach as used by the `scikit-build-core` package, and it improves portability, especially given that CMake frequently requires downstream patching to work. In this version of the patch, I've created a minimal PEP517 build backend that inherits the functions provided by setuptools, and adds the CMake dependency when necessary. This avoids using deprecated setuptools `setup_requires` argument, and it avoids adding CMake dependency when building source distributions. ### Motivation and Context Same as onnx#6642, except using PEP517 backend instead of deprecated `setup_requires`. Signed-off-by: Michał Górny <mgorny@gentoo.org> Signed-off-by: seungwoo-ji <seungwoo.ji@nuvilab.com>
Description
Instead of unconditionally pulling
cmake
PyPI package in, check whethercmake
is available first and add the dependency only when it is not available. This is the same approach as used by thescikit-build-core
package, and it improves portability, especially given that CMake frequently requires downstream patching to work.In this version of the patch, I've created a minimal PEP517 build backend that inherits the functions provided by setuptools, and adds the CMake dependency when necessary. This avoids using deprecated setuptools
setup_requires
argument, and it avoids adding CMake dependency when building source distributions.Motivation and Context
Same as #6642, except using PEP517 backend instead of deprecated
setup_requires
.