From 3c3294180df6022db1ba5e9607b8474e3064c5b4 Mon Sep 17 00:00:00 2001 From: jakirkham Date: Tue, 28 Nov 2023 14:51:09 -0800 Subject: [PATCH 1/4] Add trivial `setup.py` --- python/cucim/setup.py | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 python/cucim/setup.py diff --git a/python/cucim/setup.py b/python/cucim/setup.py new file mode 100644 index 000000000..18aa01099 --- /dev/null +++ b/python/cucim/setup.py @@ -0,0 +1,5 @@ +# Copyright (c) 2023, NVIDIA CORPORATION. + +from setuptools import setup + +setup() From 07e2ed20c9ab0dcded29c133ccbb4044e6ed046c Mon Sep 17 00:00:00 2001 From: jakirkham Date: Tue, 28 Nov 2023 19:09:07 -0800 Subject: [PATCH 2/4] Set `Distribution.has_ext_modules` to `True` Ensure `setuptools` knows our package has extension modules. Even though it is not totally obvious they are there. --- python/cucim/setup.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/python/cucim/setup.py b/python/cucim/setup.py index 18aa01099..23534bec7 100644 --- a/python/cucim/setup.py +++ b/python/cucim/setup.py @@ -1,5 +1,16 @@ # Copyright (c) 2023, NVIDIA CORPORATION. from setuptools import setup +from setuptools.dist import Distribution as _Distribution -setup() + +# 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, +) From f6752ac0cde117288cd301e418d10fc98a5e1827 Mon Sep 17 00:00:00 2001 From: jakirkham Date: Fri, 8 Dec 2023 12:54:03 -0800 Subject: [PATCH 3/4] Revert "Retag wheels to be `cpXY` (#644)" This reverts commit 12ec30b7cda53895510a2efb3349d6c25602a273. Doing this because `wheel tags` adds an additional `Root-Is-Purelib` field to `*.dist-info/WHEEL` without removing the previous one, which causes the wheel to fail checks. --- ci/build_wheel.sh | 8 -------- 1 file changed, 8 deletions(-) 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/* From 96630bede121035ea048967fd4be0094cb95add8 Mon Sep 17 00:00:00 2001 From: jakirkham Date: Fri, 8 Dec 2023 14:07:10 -0800 Subject: [PATCH 4/4] Fix-up packaging license files in wheel --- python/cucim/LICENSE | 1 + python/cucim/LICENSE-3rdparty.md | 1 + python/cucim/pyproject.toml | 5 ++++- 3 files changed, 6 insertions(+), 1 deletion(-) create mode 120000 python/cucim/LICENSE create mode 120000 python/cucim/LICENSE-3rdparty.md 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]