scikit-build-core
scikit-build-core copied to clipboard
feat: Rework CMake search path settings
- [ ] Add a settings container for the relevant
CMAKE_PREFIX_*,*_ROOT, etc. search settings and overrides- [ ] Naming and where to put. It might make more sense to be under
cmakerather than at the top
- [ ] Naming and where to put. It might make more sense to be under
- [x] Gate the install path's site-packages by an option
- [ ] Gate the isolated build directory's install path by an option
I suspect this is related to
if site_packages != DIR.parent.parent:? - [x] Add logic for
entry_points(group="cmake.root"):- Use the key as the name for the
<Pkg>_ROOT - Fail if more than one module tries to define the same
<Pkg> - Should we support list of roots?
- Use the key as the name for the
- [x] Add dict options mirroring the entry-points with higher priority
This allows to override the entry-points, e.g. setting to
""to delete that entry - [x] Update the schema
- [ ] Expand the paths with variables for
site-packagesor others, e.g. config option could have{platlib}/other_projectNot sure how to do this one. - [x] Documentation
- Add a new page on all the search logics
- Encourage the usage of
cmake.rootovercmake.prefix(cannot deprecate because some consumers might not usefind_package, e.g.swig)
- [ ] Tests
Closes #831 Closes #885 Relates to #860 (still keeping it open because it doesn't address the specific issue)
Codecov Report
Attention: Patch coverage is 67.14286% with 23 lines in your changes missing coverage. Please review.
Project coverage is 83.62%. Comparing base (
1124da7) to head (836c51e). Report is 2 commits behind head on main.
| Files with missing lines | Patch % | Lines |
|---|---|---|
| src/scikit_build_core/builder/builder.py | 53.65% | 19 Missing :warning: |
| src/scikit_build_core/cmake.py | 33.33% | 4 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## main #880 +/- ##
==========================================
- Coverage 83.90% 83.62% -0.29%
==========================================
Files 74 75 +1
Lines 4387 4451 +64
==========================================
+ Hits 3681 3722 +41
- Misses 706 729 +23
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
(Sorry I'm a bit slow reviewing, classes start this week and I'm teaching again)
Conflict, and were you planning any extra tests?
Conflict, and were you planning any extra tests?
Yeah, forgot about that one. Added the tests for cmake.root, but haven't thought of how to add one for search.site-packages