Skip to content

Commit

Permalink
Fix several issues with wheel builds (#439)
Browse files Browse the repository at this point in the history
* Ensure correct directory layout in both wheels
* Add CMake entry point to libkvikio wheel
* Require kvikio wheel to use libkvikio wheel
* Exclude unneeded source files from wheel

Authors:
  - Kyle Edwards (https://github.com/KyleFromNVIDIA)

Approvers:
  - James Lamb (https://github.com/jameslamb)
  - Mike Sarahan (https://github.com/msarahan)
  - Robert Maynard (https://github.com/robertmaynard)
  - Vyas Ramasubramani (https://github.com/vyasr)

URL: #439
  • Loading branch information
KyleFromNVIDIA authored Aug 16, 2024
1 parent ef2a704 commit 56d859e
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 7 deletions.
1 change: 1 addition & 0 deletions ci/build_wheel_python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ cd "${package_dir}"
echo "libkvikio-${RAPIDS_PY_CUDA_SUFFIX} @ file://$(echo ${CPP_WHEELHOUSE}/libkvikio_*.whl)" > ./constraints.txt

PIP_CONSTRAINT="${PWD}/constraints.txt" \
SKBUILD_CMAKE_ARGS="-DFIND_KVIKIO_CPP=ON" \
python -m pip wheel . -w dist -vvv --no-deps --disable-pip-version-check

mkdir -p final_dist
Expand Down
2 changes: 1 addition & 1 deletion python/kvikio/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ option(FIND_KVIKIO_CPP
include(../../cpp/cmake/Modules/FindcuFile.cmake)

if(FIND_KVIKIO_CPP)
find_package(KvikIO "${RAPIDS_VERSION}")
find_package(KvikIO REQUIRED "${RAPIDS_VERSION}")
else()
set(KvikIO_FOUND OFF)
endif()
Expand Down
8 changes: 2 additions & 6 deletions python/kvikio/cmake/thirdparty/get_nvcomp.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# =============================================================================
# Copyright (c) 2021-2023, NVIDIA CORPORATION.
# Copyright (c) 2021-2024, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
# in compliance with the License. You may obtain a copy of the License at
Expand All @@ -18,11 +18,7 @@ set(KVIKIO_USE_PROPRIETARY_BINARY ON)
function(find_and_configure_nvcomp)

include(${rapids-cmake-dir}/cpm/nvcomp.cmake)
rapids_cpm_nvcomp(
BUILD_EXPORT_SET kvikio-exports
INSTALL_EXPORT_SET kvikio-exports
USE_PROPRIETARY_BINARY ${KVIKIO_USE_PROPRIETARY_BINARY}
)
rapids_cpm_nvcomp(USE_PROPRIETARY_BINARY ${KVIKIO_USE_PROPRIETARY_BINARY})

# Per-thread default stream
if(TARGET nvcomp AND PER_THREAD_DEFAULT_STREAM)
Expand Down
1 change: 1 addition & 0 deletions python/kvikio/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ ninja.make-fallback = true
sdist.exclude = ["*tests*"]
sdist.reproducible = true
wheel.packages = ["kvikio"]
wheel.exclude = ["*.pyx", "CMakeLists.txt"]

[tool.scikit-build.metadata.version]
provider = "scikit_build_core.metadata.regex"
Expand Down
4 changes: 4 additions & 0 deletions python/libkvikio/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ sdist.exclude = ["*tests*"]
sdist.reproducible = true
wheel.packages = ["libkvikio"]
wheel.py-api = "py3"
wheel.install-dir = "libkvikio"

[tool.scikit-build.metadata.version]
provider = "scikit_build_core.metadata.regex"
Expand All @@ -55,3 +56,6 @@ requires = [
"cmake>=3.26.4,!=3.30.0",
"ninja",
] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../../dependencies.yaml and run `rapids-dependency-file-generator`.

[project.entry-points."cmake.prefix"]
libkvikio = "libkvikio"

0 comments on commit 56d859e

Please sign in to comment.