[pypy-svn] r59736 - pypy/build/benchmem
xoraxax at codespeak.net
xoraxax at codespeak.net
Wed Nov 5 19:32:32 CET 2008
Author: xoraxax
Date: Wed Nov 5 19:32:31 2008
New Revision: 59736
Modified:
pypy/build/benchmem/runbench.py
Log:
Move from compilation to full importing to get imported modules compiled transitively.
Modified: pypy/build/benchmem/runbench.py
==============================================================================
--- pypy/build/benchmem/runbench.py (original)
+++ pypy/build/benchmem/runbench.py Wed Nov 5 19:32:31 2008
@@ -212,9 +212,7 @@
#self.log("created", benchpyfile)
cmd = "%s -u %s" %(self.executable, benchpyfile)
self.log("running %s(%s)" %(name, self.options.numiter))
- compile_cmd = 'from py_compile import compile; compile("%s")' % (str(benchpyfile), )
- compile_cmdline = "%s -c '%s'" % (self.executable, compile_cmd)
- os.system(compile_cmdline)
+ os.system(cmd + " --compileonly")
stdout, stdin = os.popen2(cmd)
pid = int(stdin.readline())
self.write_benchheader(name, self.options.numiter)
@@ -233,6 +231,8 @@
if __name__ == "__main__":
import os, sys, gc
+ if len(sys.argv) > 1 and sys.argv[1] == '--compileonly':
+ raise SystemExit
pid = os.getpid()
write(str(pid) + "\\n")
sys.stdin.read(1)
More information about the Pypy-commit
mailing list