summaryrefslogtreecommitdiff
path: root/numpy/distutils/mingw32ccompiler.py
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/distutils/mingw32ccompiler.py')
-rw-r--r--numpy/distutils/mingw32ccompiler.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/numpy/distutils/mingw32ccompiler.py b/numpy/distutils/mingw32ccompiler.py
index 870df0693..8e14fea13 100644
--- a/numpy/distutils/mingw32ccompiler.py
+++ b/numpy/distutils/mingw32ccompiler.py
@@ -254,7 +254,7 @@ def find_python_dll():
# - in system32,
# - ortherwise (Sxs), I don't know how to get it.
stems = [sys.prefix]
- if sys.base_prefix != sys.prefix:
+ if hasattr(sys, 'base_prefix') and sys.base_prefix != sys.prefix:
stems.append(sys.base_prefix)
sub_dirs = ['', 'lib', 'bin']
@@ -426,7 +426,7 @@ def _check_for_import_lib():
# directory trees that may contain the library
stems = [sys.prefix]
- if sys.base_prefix != sys.prefix:
+ if hasattr(sys, 'base_prefix') and sys.base_prefix != sys.prefix:
stems.append(sys.base_prefix)
# possible subdirectories within those trees where it is placed
@@ -482,7 +482,11 @@ def _build_import_library_x86():
if not os.path.isfile(lib_file):
# didn't find library file in virtualenv, try base distribution, too,
# and use that instead if found there
- base_lib = os.path.join(sys.base_prefix, 'libs', lib_name)
+ if hasattr(sys, 'base_prefix'):
+ base_lib = os.path.join(sys.base_prefix, 'libs', lib_name)
+ else:
+ base_lib = '' # os.path.isfile('') == False
+
if os.path.isfile(base_lib):
lib_file = base_lib
else: