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

Switch to scikit-build-core #325

Merged
merged 3 commits into from
Dec 14, 2023
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion conda/environments/all_cuda-118_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ dependencies:
- pytest
- pytest-cov
- python>=3.9,<3.11
- scikit-build>=0.13.1
- scikit-build-core>=0.7.0
- sphinx
- sphinx-click
- sphinx_rtd_theme
Expand Down
2 changes: 1 addition & 1 deletion conda/environments/all_cuda-120_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ dependencies:
- pytest
- pytest-cov
- python>=3.9,<3.11
- scikit-build>=0.13.1
- scikit-build-core>=0.7.0
- sphinx
- sphinx-click
- sphinx_rtd_theme
Expand Down
2 changes: 1 addition & 1 deletion conda/recipes/kvikio/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ requirements:
{% endif %}
- cuda-version ={{ cuda_version }}
- nvcomp {{ nvcomp_version }}
- scikit-build >=0.13.1
- scikit-build-core >=0.7.0
- libkvikio ={{ version }}
run:
- python
Expand Down
13 changes: 10 additions & 3 deletions dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ files:
arch: [x86_64]
includes:
- build
- build_legate_wheel
- checks
- cudatoolkit
- docs
Expand Down Expand Up @@ -65,6 +66,7 @@ files:
table: build-system
includes:
- build
- build_legate_wheel
legate_py_run:
output: pyproject
pyproject_dir: legate
Expand Down Expand Up @@ -94,15 +96,14 @@ dependencies:
- cmake>=3.26.4
- cython>=3.0.0
- ninja
- scikit-build>=0.13.1
- output_types: conda
packages:
- c-compiler
- cxx-compiler
- scikit-build-core>=0.7.0
- output_types: [requirements, pyproject]
packages:
- setuptools
- wheel
- scikit-build-core[pyproject]>=0.7.0
specific:
- output_types: conda
matrices:
Expand Down Expand Up @@ -133,6 +134,12 @@ dependencies:
packages:
- cuda-version=12.0
- cuda-nvcc
build_legate_wheel:
common:
- output_types: [requirements, pyproject]
packages:
- setuptools
- wheel
checks:
common:
- output_types: [conda, requirements]
Expand Down
2 changes: 1 addition & 1 deletion legate/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ requires = [
"cmake>=3.26.4",
"cython>=3.0.0",
"ninja",
"scikit-build>=0.13.1",
"scikit-build-core[pyproject]>=0.7.0",
"setuptools",
"wheel",
] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../dependencies.yaml and run `rapids-dependency-file-generator`.
Expand Down
8 changes: 2 additions & 6 deletions python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,7 @@ rapids_cuda_init_architectures(kvikio-python)
project(
kvikio-python
VERSION ${kvikio_version}
LANGUAGES # TODO: Building Python extension modules via the python_extension_module requires the C
# language to be enabled here. The test project that is built in scikit-build to verify
# various linking options for the python library is hardcoded to build with C, so until
# that is fixed we need to keep C.
C CXX CUDA
LANGUAGES CXX CUDA
)

option(FIND_KVIKIO_CPP
Expand All @@ -53,7 +49,7 @@ if(NOT KvikIO_FOUND)
install(TARGETS kvikio DESTINATION ${cython_lib_dir})
endif()

include(rapids-cython)
include(rapids-cython-core)
rapids_cython_init()

add_subdirectory(cmake)
Expand Down
1 change: 1 addition & 0 deletions python/README.md
14 changes: 10 additions & 4 deletions python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@
# See file LICENSE for terms.

[build-system]
build-backend = "setuptools.build_meta"
build-backend = "scikit_build_core.build"
requires = [
"cmake>=3.26.4",
"cython>=3.0.0",
"ninja",
"scikit-build>=0.13.1",
"setuptools",
"wheel",
"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`.

[project]
Expand Down Expand Up @@ -109,3 +107,11 @@ ignore_missing_imports = true

[project.entry-points."numcodecs.codecs"]
nvcomp_batch = "kvikio.nvcomp_codec:NvCompBatchCodec"

[tool.scikit-build]
build-dir = "build/{wheel_tag}"
cmake.build-type = "Release"
cmake.minimum-version = "3.26.4"
ninja.make-fallback = true
sdist.reproducible = true
wheel.packages = ["kvikio"]
17 changes: 0 additions & 17 deletions python/setup.py

This file was deleted.