[pypy-commit] pypy py3k: fish the name of the python3 executable from the conftest

antocuni noreply at buildbot.pypy.org
Fri Jan 27 20:29:24 CET 2012


Author: Antonio Cuni <anto.cuni at gmail.com>
Branch: py3k
Changeset: r51879:7aeb630cb68e
Date: 2012-01-27 15:28 +0100
http://bitbucket.org/pypy/pypy/changeset/7aeb630cb68e/

Log:	fish the name of the python3 executable from the conftest

diff --git a/pypy/interpreter/test/test_syntax.py b/pypy/interpreter/test/test_syntax.py
--- a/pypy/interpreter/test/test_syntax.py
+++ b/pypy/interpreter/test/test_syntax.py
@@ -1,5 +1,6 @@
 import py
 import commands
+import pypy.conftest
 from pypy.conftest import gettestobjspace
 
 def splitcases(s):
@@ -94,9 +95,9 @@
 """ % (i, i, INVALID[i], INVALID[i])
 
 
-PYTHON3 = py.path.local.sysfind('python3')
 def checksyntax_cpython(tmpdir, i, s):
-    if PYTHON3 is None:
+    python3 = pypy.conftest.option.python
+    if python3 is None:
         print 'Warning: cannot run python3 to check syntax'
         return
 
@@ -112,7 +113,7 @@
 ''' % s
     pyfile = tmpdir.join('checkvalid_%d.py' % i)
     pyfile.write(src)
-    res = commands.getoutput('"%s" "%s"' % (PYTHON3, pyfile))
+    res = commands.getoutput('"%s" "%s"' % (python3, pyfile))
     return res
 
 def checkvalid_cpython(tmpdir, i, s):


More information about the pypy-commit mailing list