Skip to content

Commit

Permalink
Fix in compilation of filtered_fft, import from setuptools instead of…
Browse files Browse the repository at this point in the history
… distutils (#591)
  • Loading branch information
daurer authored Dec 13, 2024
1 parent 0c78215 commit ac2563d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions cufft/extensions.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
import os, re
import subprocess
import sysconfig
from distutils.unixccompiler import UnixCCompiler
from distutils.command.build_ext import build_ext
from setuptools._distutils.unixccompiler import UnixCCompiler
from setuptools.command.build_ext import build_ext


def find_in_path(name, path):
Expand Down Expand Up @@ -116,6 +116,7 @@ def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts):
compiler_command = [self.CUDA["nvcc"]] + self.NVCC_FLAGS + self.OPTFLAGS + ["-Xcompiler"] + self.CXXFLAGS + CPPFLAGS
compiler_exec = " ".join(compiler_command)
self.set_executable('compiler_so', compiler_exec)
self.set_executable('compiler_so_cxx', compiler_exec)
postargs = [] # we don't actually have any postargs
super(NvccCompiler, self)._compile(obj, src, ext, cc_args, postargs, pp_opts) # the _compile method
# reset the default compiler_so, which we might have changed for cuda
Expand Down
2 changes: 1 addition & 1 deletion cufft/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# we should aim to remove the distutils dependency
import setuptools
from distutils.core import setup, Extension
from setuptools import setup, Extension
import os

ext_modules = []
Expand Down

0 comments on commit ac2563d

Please sign in to comment.