From 07e2ed20c9ab0dcded29c133ccbb4044e6ed046c Mon Sep 17 00:00:00 2001 From: jakirkham Date: Tue, 28 Nov 2023 19:09:07 -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 | 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, +)