From 1515186f5270041b0bbc51b6e8ae42cc0f47f04c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20And=C3=A9n?= Date: Tue, 12 Dec 2023 06:47:49 -0500 Subject: [PATCH] cuda+py: move C extension into cufinufft package Instead of living in the site-packages root, we put this in the `cufinufft` package, similarly to `finufft`. --- python/cufinufft/cufinufft/_cufinufft.py | 2 +- python/cufinufft/setup.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/python/cufinufft/cufinufft/_cufinufft.py b/python/cufinufft/cufinufft/_cufinufft.py index d1553c72e..2ca0d3b3f 100644 --- a/python/cufinufft/cufinufft/_cufinufft.py +++ b/python/cufinufft/cufinufft/_cufinufft.py @@ -42,7 +42,7 @@ try: if lib is None: # Find the library. - fh = imp.find_module('cufinufftc')[0] + fh = imp.find_module('cufinufft/cufinufftc')[0] # Get the full path for the ctypes loader. full_lib_path = os.path.realpath(fh.name) fh.close() # Be nice and close the open file handle. diff --git a/python/cufinufft/setup.py b/python/cufinufft/setup.py index d96d73ece..8fea5fee0 100644 --- a/python/cufinufft/setup.py +++ b/python/cufinufft/setup.py @@ -68,9 +68,9 @@ # that is rpath linked to CUDA library, also decorated (by auditwheel). # Most importantly, pip will manage to install all this stuff in # in places Python can find it (with a little help). - py_modules=['cufinufftc'], + py_modules=['cufinufft.cufinufftc'], ext_modules=[ - Extension(name='cufinufftc', + Extension(name='cufinufft.cufinufftc', sources=[], libraries=['cufinufft'], library_dirs=[library_dir],