[Python-checkins] r78834 - in python/branches/py3k: Lib/sysconfig.py Lib/test/test_subprocess.py

florent.xicluna python-checkins at python.org
Thu Mar 11 02:53:10 CET 2010


Author: florent.xicluna
Date: Thu Mar 11 02:53:10 2010
New Revision: 78834
Log:
Merged revisions 78833 via svnmerge from 
svn+ssh://pythondev@svn.python.org/python/trunk
........
 r78833 | florent.xicluna | 2010年03月11日 02:50:48 +0100 (jeu, 11 mar 2010) | 2 lines
 
 Revert r78830: realpath() should really be applied to sys.executable.
........
Modified:
 python/branches/py3k/ (props changed)
 python/branches/py3k/Lib/sysconfig.py
 python/branches/py3k/Lib/test/test_subprocess.py
Modified: python/branches/py3k/Lib/sysconfig.py
==============================================================================
--- python/branches/py3k/Lib/sysconfig.py	(original)
+++ python/branches/py3k/Lib/sysconfig.py	Thu Mar 11 02:53:10 2010
@@ -84,8 +84,7 @@
 _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))
@@ -297,7 +296,7 @@
 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
Modified: python/branches/py3k/Lib/test/test_subprocess.py
==============================================================================
--- python/branches/py3k/Lib/test/test_subprocess.py	(original)
+++ python/branches/py3k/Lib/test/test_subprocess.py	Thu Mar 11 02:53:10 2010
@@ -135,7 +135,7 @@
 self.assertEqual(p.stderr, None)
 
 def test_executable_with_cwd(self):
- python_dir = os.path.realpath(os.path.dirname(sys.executable))
+ python_dir = os.path.dirname(os.path.realpath(sys.executable))
 p = subprocess.Popen(["somethingyoudonthave", "-c",
 "import sys; sys.exit(47)"],
 executable=sys.executable, cwd=python_dir)


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /