From a2506afca927fed8dcb85ddbc789ec08ea0bbadf Mon Sep 17 00:00:00 2001 From: jakirkham Date: Tue, 28 Nov 2023 18:59:21 -0800 Subject: [PATCH] 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 | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/python/cucim/setup.py b/python/cucim/setup.py index 18aa01099..c8b698e7a 100644 --- a/python/cucim/setup.py +++ b/python/cucim/setup.py @@ -1,5 +1,15 @@ # 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, +)