Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #2791 from juliantaylor/ma-python

add platform specific python include directories to search paths
  • Loading branch information...
commit b7b54cdd91305e9334564c7bf388192e35016c77 2 parents c97f405 + c6c95f4
@rgommers rgommers authored
Showing with 8 additions and 2 deletions.
  1. +8 −2 numpy/distutils/system_info.py
View
10 numpy/distutils/system_info.py
@@ -1623,6 +1623,9 @@ def __init__(self):
pass
py_incl_dir = distutils.sysconfig.get_python_inc()
include_dirs.append(py_incl_dir)
+ py_pincl_dir = distutils.sysconfig.get_python_inc(plat_specific=True)
+ if py_pincl_dir not in include_dirs:
+ include_dirs.append(py_pincl_dir)
for d in default_include_dirs:
d = os.path.join(d, os.path.basename(py_incl_dir))
if d not in include_dirs:
@@ -1754,12 +1757,15 @@ def calc_info(self):
break
if not src_dir:
return
- py_incl_dir = distutils.sysconfig.get_python_inc()
+ py_incl_dirs = [distutils.sysconfig.get_python_inc()]
+ py_pincl_dir = distutils.sysconfig.get_python_inc(plat_specific=True)
+ if py_pincl_dir not in py_incl_dirs:
+ py_incl_dirs.append(py_pincl_dir)
srcs_dir = os.path.join(src_dir, 'libs', 'python', 'src')
bpl_srcs = glob(os.path.join(srcs_dir, '*.cpp'))
bpl_srcs += glob(os.path.join(srcs_dir, '*', '*.cpp'))
info = {'libraries': [('boost_python_src',
- {'include_dirs': [src_dir, py_incl_dir],
+ {'include_dirs': [src_dir] + py_incl_dirs,
'sources':bpl_srcs}
)],
'include_dirs': [src_dir],
Please sign in to comment.
Something went wrong with that request. Please try again.