summaryrefslogtreecommitdiffstats
path: root/Lib/sysconfig.py
diff options
context:
space:
mode:
authorFlorent Xicluna <florent.xicluna@gmail.com>2010-03-11 01:50:48 (GMT)
committerFlorent Xicluna <florent.xicluna@gmail.com>2010-03-11 01:50:48 (GMT)
commit637637021a52d083f47dfdd6dd0cc16e31696409 (patch)
tree7e438a459b33422b2d9b099e3ca568bd22221265 /Lib/sysconfig.py
parent6602ec6eff33628bbcac09a8935de4c213eeb3c2 (diff)
downloadcpython-637637021a52d083f47dfdd6dd0cc16e31696409.zip
cpython-637637021a52d083f47dfdd6dd0cc16e31696409.tar.gz
cpython-637637021a52d083f47dfdd6dd0cc16e31696409.tar.bz2
Revert r78830: realpath() should really be applied to sys.executable.
Diffstat (limited to 'Lib/sysconfig.py')
-rw-r--r--Lib/sysconfig.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py
index 2b14bfe..69264d2 100644
--- a/Lib/sysconfig.py
+++ b/Lib/sysconfig.py
@@ -84,8 +84,7 @@ _PREFIX = os.path.normpath(sys.prefix)
_EXEC_PREFIX = os.path.normpath(sys.exec_prefix)
_CONFIG_VARS = None
_USER_BASE = None
-# Note: sys.executable can be '' or even a directory, until #7774 is fixed.
-_PROJECT_BASE = realpath(os.path.dirname(sys.executable))
+_PROJECT_BASE = os.path.dirname(realpath(sys.executable))
if os.name == "nt" and "pcbuild" in _PROJECT_BASE[-8:].lower():
_PROJECT_BASE = realpath(os.path.join(_PROJECT_BASE, pardir))
@@ -295,7 +294,7 @@ def _init_non_posix(vars):
vars['SO'] = '.pyd'
vars['EXE'] = '.exe'
vars['VERSION'] = _PY_VERSION_SHORT_NO_DOT
- vars['BINDIR'] = realpath(os.path.dirname(sys.executable))
+ vars['BINDIR'] = os.path.dirname(realpath(sys.executable))
#
# public APIs