Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[python-package] update to scikit-build-core 0.10 #6597

Merged
merged 1 commit into from
Aug 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions python-package/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,21 +57,21 @@ changelog = "https://github.com/microsoft/LightGBM/releases"
# start:build-system
[build-system]

requires = ["scikit-build-core>=0.9.3"]
requires = ["scikit-build-core>=0.10.1"]
build-backend = "scikit_build_core.build"

# based on https://github.com/scikit-build/scikit-build-core#configuration
[tool.scikit-build]

cmake.version = ">=3.28"
cmake.version = "CMakeLists.txt"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is described in the blog post linked in the PR... scikit-build-core now reads cmake_minimum_required() from CMakeLists.txt and uses it to figure this out. So no more need to keep those 2 versions in sync!

I'm not sure how this would work if cmake_minimum_required() varied based on options, as this project used to do prior to #6260 .... but I hope we'll not have to go back to that in the future and can just keep having a single minimum version.

ninja.version = ">=1.11"
ninja.make-fallback = true
cmake.args = [
"-D__BUILD_FOR_PYTHON:BOOL=ON"
]
cmake.verbose = false
build.verbose = false
cmake.build-type = "Release"
cmake.targets = ["_lightgbm"]
build.targets = ["_lightgbm"]
# stripping binaries should be turned back on once this is fixed:
# https://github.com/jameslamb/pydistcheck/issues/235
install.strip = false
Expand All @@ -80,7 +80,7 @@ sdist.reproducible = true
wheel.py-api = "py3"
experimental = false
strict-config = false
minimum-version = "0.9.3"
minimum-version = "build-system.requires"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another case where scikit-build-core is reducing the need for us to keep the same version in sync across 2 fields.

Setting scikit-build-core>=0.10.1 is equivalent to setting this to minimum-version = "0.10.1" 😁


# end:build-system

Expand Down
Loading