[pypy-svn] r72944 - pypy/trunk/pypy/tool
arigo at codespeak.net
arigo at codespeak.net
Sat Mar 27 12:18:03 CET 2010
Author: arigo
Date: Sat Mar 27 12:18:01 2010
New Revision: 72944
Modified:
pypy/trunk/pypy/tool/runsubprocess.py
Log:
Don't try to run "python runsubprocess.pyc". It works on CPython,
provided the .pyc file has the correct version (and crashes otherwise,
instead of looking for the .py file). I suppose that "we don't
support that" is good enough.
Modified: pypy/trunk/pypy/tool/runsubprocess.py
==============================================================================
--- pypy/trunk/pypy/tool/runsubprocess.py (original)
+++ pypy/trunk/pypy/tool/runsubprocess.py Sat Mar 27 12:18:01 2010
@@ -42,8 +42,10 @@
if sys.platform != 'win32' and hasattr(os, 'fork'):
# do this at import-time, when the process is still tiny
+ _source = os.path.dirname(os.path.abspath(__file__))
+ _source = os.path.join(_source, 'runsubprocess.py') # and not e.g. '.pyc'
_child_stdin, _child_stdout = os.popen2(
- "'%s' '%s'" % (sys.executable, os.path.abspath(__file__)))
+ "'%s' '%s'" % (sys.executable, _source))
def _run(*args):
_child_stdin.write('%r\n' % (args,))
More information about the Pypy-commit
mailing list