diff --git a/ci/build_wheel.sh b/ci/build_wheel.sh index 60355e050..a39ebf502 100755 --- a/ci/build_wheel.sh +++ b/ci/build_wheel.sh @@ -45,14 +45,6 @@ cd "${package_dir}" python -m pip wheel . -w dist -vvv --no-deps --disable-pip-version-check -# Because we built the library with the run script and manually copied the shared pybind11 -# library, the subsequent py_project.toml wheel build was as a pure Python package and results in -# tags that incorrectly indicate it is a universal wheel. To fix this, we need to modify the wheel -# to have CPython ABI and Python tags matching the version of Python that the Python bindings were -# built with. -WHEEL_PYTHON_TAG=cp$(echo ${RAPIDS_PY_VERSION} | sed 's/\.//g') -python -m wheel tags --remove --python-tag="${WHEEL_PYTHON_TAG}" --abi-tag="${WHEEL_PYTHON_TAG}" dist/* - mkdir -p final_dist python -m auditwheel repair -w final_dist dist/* diff --git a/python/cucim/LICENSE b/python/cucim/LICENSE new file mode 120000 index 000000000..30cff7403 --- /dev/null +++ b/python/cucim/LICENSE @@ -0,0 +1 @@ +../../LICENSE \ No newline at end of file diff --git a/python/cucim/LICENSE-3rdparty.md b/python/cucim/LICENSE-3rdparty.md new file mode 120000 index 000000000..f07a448f7 --- /dev/null +++ b/python/cucim/LICENSE-3rdparty.md @@ -0,0 +1 @@ +../../LICENSE-3rdparty.md \ No newline at end of file diff --git a/python/cucim/pyproject.toml b/python/cucim/pyproject.toml index 1136ee877..ce9dc87e5 100644 --- a/python/cucim/pyproject.toml +++ b/python/cucim/pyproject.toml @@ -91,7 +91,10 @@ docs = [ cucim = "cucim.clara.cli:main" [tool.setuptools] -license-files = ["LICENSE"] +license-files = [ + "LICENSE", + "LICENSE-3rdparty.md", +] include-package-data = true [tool.setuptools.dynamic] diff --git a/python/cucim/setup.py b/python/cucim/setup.py new file mode 100644 index 000000000..23534bec7 --- /dev/null +++ b/python/cucim/setup.py @@ -0,0 +1,16 @@ +# Copyright (c) 2023, NVIDIA CORPORATION. + +from setuptools import setup +from setuptools.dist import Distribution as _Distribution + + +# As we vendored a shared object that links to a specific Python version, +# make sure it is treated as impure so the wheel is named properly. +class Distribution(_Distribution): + def has_ext_modules(self): + return True + + +setup( + distclass=Distribution, +)