scikit-build-core icon indicating copy to clipboard operation
scikit-build-core copied to clipboard

feat: Rework CMake search path settings

Open LecrisUT opened this issue 1 year ago • 2 comments

  • [ ] 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 cmake rather than at the top
  • [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?
  • [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-packages or others, e.g. config option could have {platlib}/other_project Not sure how to do this one.
  • [x] Documentation
    • Add a new page on all the search logics
    • Encourage the usage of cmake.root over cmake.prefix (cannot deprecate because some consumers might not use find_package, e.g. swig)
  • [ ] Tests

Closes #831 Closes #885 Relates to #860 (still keeping it open because it doesn't address the specific issue)

LecrisUT avatar Aug 29 '24 12:08 LecrisUT

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.

codecov[bot] avatar Aug 29 '24 13:08 codecov[bot]

(Sorry I'm a bit slow reviewing, classes start this week and I'm teaching again)

henryiii avatar Sep 03 '24 18:09 henryiii

Conflict, and were you planning any extra tests?

henryiii avatar Feb 24 '25 18:02 henryiii

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

LecrisUT avatar Feb 24 '25 19:02 LecrisUT