Skip to content
Snippets Groups Projects
Unverified Commit e7c9c258 authored by Brent Huisman's avatar Brent Huisman Committed by GitHub
Browse files

Scikit build core (#2121)

- Replaces `scikit-build` with `scikit-build-core`, which is beta-ish.
- Delete stale `setup.py`
- Create `scripts/test_executables.sh`, with a `modcc` and `a-b-c` test.
Call script in all workflows (CMake|Pip|Spack).
- Suppress setting `march` and `mtune` to `native` on versions of Apple
Clang <15. Only explicit targets are allowed, but since Apple Clang v15
`native` _is_ valid, and we only really use Apple Clang for the
universal Python wheels, this seems an acceptably simple solution.

Downsides
1.
https://scikit-build-core.readthedocs.io/en/latest/configuration.html#dynamic-metadata-wip
Looks like we cannot use `VERSION` to populate the `pyroject.toml`
version string, so it is duplicated.
2. Writing outside of the Python package dir, therefore not copy a-b-c
and modcc to /bin. Workaround is to make them callable through a
function, and bind the function to a script. There is a way to write
"scripts" (i.e. executables) outside of the package dir, but then
headers and such are still not copied. We could deduce the correct paths
for all outputs (libraries, documentation) from the env var, but that
seems no less brittle than the proposed solution, used by the CMake
project itself. See
https://github.com/scikit-build/scikit-build-core/issues/194#issuecomment-1426408196



Fixes #2109

---------

Co-authored-by: default avatarSimon Frasch <simon.frasch@cscs.ch>
parent 9d02ad27
No related branches found
No related tags found
No related merge requests found
Showing
with 179 additions and 145 deletions
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment