Skip to content

Commit

Permalink
Fix scikit-build configuration
Browse files Browse the repository at this point in the history
Use `cmake.define` instead of `cmake.args`. The latter cannot be overriden via CLI

Signed-off-by: Cristian Le <cristian.le@mpsd.mpg.de>
  • Loading branch information
LecrisUT committed Jan 25, 2024
1 parent a3a3927 commit e27399e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions .github/workflows/step_coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ jobs:
python -m pip install --upgrade pip
pip install .[test-cov] \
--config-settings=cmake.define.CMAKE_C_COMPILER=gcc \
--config-settings=cmake.define.SPGLIB_WITH_TESTS=ON \
--config-settings=cmake.define.SPGLIB_TEST_COVERAGE=ON \
--config-settings=build-dir=build
- name: Test pytest with coverage
Expand Down
10 changes: 5 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,14 @@ testing = [
[tool.scikit-build]
wheel.packages = ["python/spglib"]
wheel.install-dir = "spglib"
cmake.args = [
"-DSPGLIB_WITH_Python=ON",
"-DSPGLIB_WITH_TESTS=OFF",
"-DSPGLIB_USE_OMP=OFF",
]
metadata.version.provider = "scikit_build_core.metadata.setuptools_scm"
sdist.include = ["python/spglib/_version.py"]

[tool.scikit-build.cmake.define]
SPGLIB_WITH_Python = "ON"
SPGLIB_WITH_TESTS = "OFF"
SPGLIB_USE_OMP = "OFF"

[tool.setuptools_scm]
write_to = "python/spglib/_version.py"

Expand Down

0 comments on commit e27399e

Please sign in to comment.