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:Simon Frasch <simon.frasch@cscs.ch>
Showing
- .github/workflows/release.yml 9 additions, 5 deletions.github/workflows/release.yml
- .github/workflows/spack.yml 7 additions, 2 deletions.github/workflows/spack.yml
- .github/workflows/test-everything.yml 9 additions, 9 deletions.github/workflows/test-everything.yml
- README.md 1 addition, 1 deletionREADME.md
- cmake/CompilerOptions.cmake 10 additions, 5 deletionscmake/CompilerOptions.cmake
- doc/contrib/release.rst 1 addition, 0 deletionsdoc/contrib/release.rst
- doc/install/build_install.rst 14 additions, 17 deletionsdoc/install/build_install.rst
- doc/install/gui.rst 1 addition, 1 deletiondoc/install/gui.rst
- doc/install/python.rst 15 additions, 26 deletionsdoc/install/python.rst
- pyproject.toml 24 additions, 20 deletionspyproject.toml
- python/CMakeLists.txt 10 additions, 1 deletionpython/CMakeLists.txt
- python/__init__.py 27 additions, 0 deletionspython/__init__.py
- python/config.cpp 3 additions, 3 deletionspython/config.cpp
- python/example/example_requirements.txt 1 addition, 1 deletionpython/example/example_requirements.txt
- scripts/arbor-build-catalogue 33 additions, 27 deletionsscripts/arbor-build-catalogue
- scripts/run_python_examples.sh 1 addition, 1 deletionscripts/run_python_examples.sh
- scripts/test_executables.sh 12 additions, 0 deletionsscripts/test_executables.sh
- setup.py 0 additions, 25 deletionssetup.py
- spack/package.py 1 addition, 1 deletionspack/package.py
Please register or sign in to comment