diff options
Diffstat (limited to 'numpy/distutils/system_info.py')
| -rw-r--r-- | numpy/distutils/system_info.py | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/numpy/distutils/system_info.py b/numpy/distutils/system_info.py index 5bda213e7..d12381028 100644 --- a/numpy/distutils/system_info.py +++ b/numpy/distutils/system_info.py @@ -219,21 +219,21 @@ if sys.platform == 'win32': _lib_dirs = [ 'lib', ] - + _include_dirs = [d.replace('/', os.sep) for d in _include_dirs] _lib_dirs = [d.replace('/', os.sep) for d in _lib_dirs] def add_system_root(library_root): """Add a package manager root to the include directories""" global default_lib_dirs global default_include_dirs - + library_root = os.path.normpath(library_root) - + default_lib_dirs.extend( os.path.join(library_root, d) for d in _lib_dirs) default_include_dirs.extend( os.path.join(library_root, d) for d in _include_dirs) - + if sys.version_info >= (3, 3): # VCpkg is the de-facto package manager on windows for C/C++ # libraries. If it is on the PATH, then we append its paths here. @@ -247,7 +247,7 @@ if sys.platform == 'win32': else: specifier = 'x64' - vcpkg_installed = os.path.join(vcpkg_dir, 'installed') + vcpkg_installed = os.path.join(vcpkg_dir, 'installed') for vcpkg_root in [ os.path.join(vcpkg_installed, specifier + '-windows'), os.path.join(vcpkg_installed, specifier + '-windows-static'), @@ -260,7 +260,7 @@ if sys.platform == 'win32': conda_dir = os.path.dirname(conda) add_system_root(os.path.join(conda_dir, '..', 'Library')) add_system_root(os.path.join(conda_dir, 'Library')) - + else: default_lib_dirs = libpaths(['/usr/local/lib', '/opt/lib', '/usr/lib', '/opt/local/lib', '/sw/lib'], platform_bits) @@ -1551,7 +1551,9 @@ class lapack_opt_info(system_info): if not atlas_info: atlas_info = get_info('atlas') - if sys.platform == 'darwin' and not (atlas_info or openblas_info or + if sys.platform == 'darwin' \ + and not os.getenv('_PYTHON_HOST_PLATFORM', None) \ + and not (atlas_info or openblas_info or lapack_mkl_info): # Use the system lapack from Accelerate or vecLib under OSX args = [] @@ -1657,7 +1659,9 @@ class blas_opt_info(system_info): if not atlas_info: atlas_info = get_info('atlas_blas') - if sys.platform == 'darwin' and not (atlas_info or openblas_info or + if sys.platform == 'darwin' \ + and not os.getenv('_PYTHON_HOST_PLATFORM', None) \ + and not (atlas_info or openblas_info or blas_mkl_info or blis_info): # Use the system BLAS from Accelerate or vecLib under OSX args = [] |
