diff --git a/setup.py b/setup.py --- a/setup.py +++ b/setup.py @@ -3,7 +3,8 @@ import sys, os, importlib.machinery, re, optparse from glob import glob -import sysconfig +from distutils import sysconfig +from sysconfig import get_path from distutils import log from distutils import text_file @@ -196,7 +197,7 @@ # Python header files headers = [sysconfig.get_config_h_filename()] - headers += glob(os.path.join(sysconfig.get_path('include'), "*.h")) + headers += glob(os.path.join(get_path('include'), "*.h")) for ext in self.extensions[:]: ext.sources = [ find_module_file(filename, moddirlist) @@ -230,18 +231,6 @@ if ext.name in remove_modules: self.extensions.remove(ext) - # When you run "make CC=altcc" or something similar, you really want - # those environment variables passed into the setup.py phase. Here's - # a small set of useful ones. - compiler = os.environ.get('CC') - args = {} - # unfortunately, distutils doesn't let us provide separate C and C++ - # compilers - if compiler is not None: - (ccshared,cflags) = sysconfig.get_config_vars('CCSHARED','CFLAGS') - args['compiler_so'] = compiler + ' ' + ccshared + ' ' + cflags - self.compiler.set_executables(**args) - build_ext.build_extensions(self) longest = max([len(e.name) for e in self.extensions])