add-test: Make sure PyPy bytecode is separated

This commit is contained in:
rocky
2016-07-24 10:32:35 -04:00
parent 936b213cec
commit 808e468e5e
2 changed files with 4 additions and 1 deletions

View File

@@ -6,7 +6,10 @@ assert len(sys.argv) >= 2
version = sys.version[0:3] version = sys.version[0:3]
for path in sys.argv[1:]: for path in sys.argv[1:]:
short = os.path.basename(path) short = os.path.basename(path)
cfile = "bytecode_%s/%s" % (version, short) + 'c' if hasattr(sys, 'pypy_version_info'):
cfile = "bytecode_pypy%s/%s" % (version, short) + 'c'
else:
cfile = "bytecode_%s/%s" % (version, short) + 'c'
print("byte-compiling %s to %s" % (path, cfile)) print("byte-compiling %s to %s" % (path, cfile))
py_compile.compile(path, cfile) py_compile.compile(path, cfile)
if isinstance(version, str) or version >= (2, 6, 0): if isinstance(version, str) or version >= (2, 6, 0):

Binary file not shown.