rapidsai / dependency-file-generator

https://pypi.org/project/rapids-dependency-file-generator/
Apache License 2.0
15 stars 13 forks source link

Some suggested updates for scikit-build-core #98

Closed henryiii closed 6 months ago

henryiii commented 6 months ago

I was looking at the config, and saw some updates, but didn't know where to make them. For configs like this:

[build-system]
build-backend = "scikit_build_core.build"
requires = [
    "cmake>=3.26.4",
    "cython>=3.0.3",
    "ninja",
    "numpy==1.23.*",
    "pyarrow==16.0.0.*",
    "rmm==24.6.*",
    "scikit-build-core[pyproject]>=0.7.0",
] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../../dependencies.yaml and run `rapids-dependency-file-generator`.

The cmake and ninja items should be removed. The "scikit_build_core.build" adds them intelligently based on what's already on the system and what you set in tool.scikit-build.

If you increase the scikit-build-core version here to >=0.9, you can drop the [pyproject] extra, it's included now.

And, for that section:

[tool.scikit-build]
build-dir = "build/{wheel_tag}"
cmake.build-type = "Release"
cmake.minimum-version = "3.26.4"
ninja.make-fallback = true
sdist.exclude = ["*tests*"]
sdist.reproducible = true
wheel.packages = ["cudf"]

[tool.scikit-build.metadata.version]
provider = "scikit_build_core.metadata.regex"
input = "cudf/VERSION"
regex = "(?P<value>.*)"

I'd recommend setting the minimum-version to 0.9, changing cmake.minimum-version = "3.26.4" to cmake.version = ">=3.26.4" (the minimum-version value will enforce this if set high enough). This also protects the defaults, in case you want to remove a few of the defaults. The minimum would be, then:

[tool.scikit-build]
minimum-version = "0.9"
build-dir = "build/{wheel_tag}"
cmake.version = ">=3.26.4"
sdist.exclude = ["*tests*"]
wheel.packages = ["cudf"]

[tool.scikit-build.metadata.version]
provider = "scikit_build_core.metadata.regex"
input = "cudf/VERSION"
regex = "(?P<value>.*)"
vyasr commented 6 months ago

Thanks for pointing this out @henryiii! We're largely tracking all of the same suggestions on a RAPIDS-wide basis in https://github.com/rapidsai/build-planning/issues/58 (and in my first comment response in that issue) Could you take a look and see if there's anything you would change in that issue? From a quick look, it also captures the same things (minimum-version->version, (probably) remove cmake/ninja from reqs).