summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Berg <sebastian@sipsolutions.net>2022-10-14 11:47:39 +0200
committerGitHub <noreply@github.com>2022-10-14 11:47:39 +0200
commit6094eff95c19c433648593f3cb6bca489396f9ae (patch)
tree38195cc7f7e0120f2ca5de5e06aadc8e82e400e3
parent6d56ebb7c66673dd7121100fb36b85dce1d6b3e6 (diff)
parenteba83419b0668d2609a4f15a43eddf921813037f (diff)
downloadnumpy-6094eff95c19c433648593f3cb6bca489396f9ae.tar.gz
Merge pull request #22432 from DimitriPapadopoulos/sys.real_prefix
MAINT: always use sys.base_prefix, never use sys.real_prefix
-rw-r--r--numpy/distutils/mingw32ccompiler.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/numpy/distutils/mingw32ccompiler.py b/numpy/distutils/mingw32ccompiler.py
index 3349a56e8..5d1c27a65 100644
--- a/numpy/distutils/mingw32ccompiler.py
+++ b/numpy/distutils/mingw32ccompiler.py
@@ -184,14 +184,11 @@ def find_python_dll():
# We can't do much here:
# - find it in the virtualenv (sys.prefix)
# - find it in python main dir (sys.base_prefix, if in a virtualenv)
- # - sys.real_prefix is main dir for virtualenvs in Python 2.7
# - in system32,
# - ortherwise (Sxs), I don't know how to get it.
stems = [sys.prefix]
- if hasattr(sys, 'base_prefix') and sys.base_prefix != sys.prefix:
+ if sys.base_prefix != sys.prefix:
stems.append(sys.base_prefix)
- elif hasattr(sys, 'real_prefix') and sys.real_prefix != sys.prefix:
- stems.append(sys.real_prefix)
sub_dirs = ['', 'lib', 'bin']
# generate possible combinations of directory trees and sub-directories