-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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] upgrade to scikit-build-core 0.9.3 #6263
Changes from all commits
63aacef
8c6a8e3
220f7db
089a1e8
fb8e4e1
e2990fc
e014047
3d194c8
f14c303
754b5c9
048423e
a20f27f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -57,26 +57,30 @@ changelog = "https://github.com/microsoft/LightGBM/releases" | |
# start:build-system | ||
[build-system] | ||
|
||
requires = ["scikit-build-core>=0.4.4"] | ||
requires = ["scikit-build-core>=0.9.3"] | ||
build-backend = "scikit_build_core.build" | ||
|
||
# based on https://github.com/scikit-build/scikit-build-core#configuration | ||
[tool.scikit-build] | ||
|
||
cmake.minimum-version = "3.18" | ||
ninja.minimum-version = "1.11" | ||
cmake.version = ">=3.18" | ||
ninja.version = ">=1.11" | ||
ninja.make-fallback = true | ||
cmake.args = [ | ||
"-D__BUILD_FOR_PYTHON:BOOL=ON" | ||
] | ||
cmake.verbose = false | ||
cmake.build-type = "Release" | ||
cmake.targets = ["_lightgbm"] | ||
# stripping binaries should be turned back on once this is fixed: | ||
# https://github.com/jameslamb/pydistcheck/issues/235 | ||
install.strip = false | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See jameslamb/pydistcheck#235 for a full description of this. Short description: it's great that |
||
logging.level = "INFO" | ||
sdist.reproducible = true | ||
wheel.py-api = "py3" | ||
experimental = false | ||
strict-config = true | ||
minimum-version = "0.4.4" | ||
minimum-version = "0.9.3" | ||
|
||
# end:build-system | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This ensures that only the shared library is built, and not other targets like the CLI or headers.
scikit-build-core
didn't support that back when we did #5759, which is why this exists:LightGBM/CMakeLists.txt
Lines 54 to 60 in 88cec47
I'd like to leave that in
CMakeLists.txt
as extra protection for now. It's only a tiny bit of complexity in exchange for protection against some potentially-impactful side effects (likepip install
of an sdist placing LightGBM's headers somewhere outside of wherepip
manages files).