diff options
author | Greg Ward <gward@python.net> | 2000-04-14 00:50:49 (GMT) |
---|---|---|
committer | Greg Ward <gward@python.net> | 2000-04-14 00:50:49 (GMT) |
commit | 1561ae13b6338cb8d5d0e6510a1815e1224abb9b (patch) | |
tree | dadfd1d510fb85524df1e2926812764f9c7ff4f9 /Lib | |
parent | 2b9e43f8d04822abe14d84ce6dc6faf0f6d51c67 (diff) | |
download | cpython-1561ae13b6338cb8d5d0e6510a1815e1224abb9b.zip cpython-1561ae13b6338cb8d5d0e6510a1815e1224abb9b.tar.gz cpython-1561ae13b6338cb8d5d0e6510a1815e1224abb9b.tar.bz2 |
Use 'get_python_inc()' to figure out the Python include directories
rather than cobbling them togethere here.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/distutils/command/build_ext.py | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/Lib/distutils/command/build_ext.py b/Lib/distutils/command/build_ext.py index ddb01d4..f08c97e 100644 --- a/Lib/distutils/command/build_ext.py +++ b/Lib/distutils/command/build_ext.py @@ -105,12 +105,9 @@ class build_ext (Command): # Make sure Python's include directories (for Python.h, config.h, - # etc.) are in the include search path. We have to roll our own - # "exec include dir", because the Makefile parsed by sysconfig - # doesn't have it (sigh). - py_include = sysconfig.INCLUDEPY # prefix + "include" + "python" + ver - exec_py_include = os.path.join (sysconfig.exec_prefix, 'include', - 'python' + sys.version[0:3]) + # etc.) are in the include search path. + py_include = sysconfig.get_python_inc() + plat_py_include = sysconfig.get_python_inc(plat_specific=1) if self.include_dirs is None: self.include_dirs = self.distribution.include_dirs or [] if type (self.include_dirs) is StringType: @@ -120,8 +117,8 @@ class build_ext (Command): # Put the Python "system" include dir at the end, so that # any local include dirs take precedence. self.include_dirs.append (py_include) - if exec_py_include != py_include: - self.include_dirs.insert (0, exec_py_include) + if plat_py_include != py_include: + self.include_dirs.append (plat_py_include) if type (self.libraries) is StringType: self.libraries = [self.libraries] |