[pypy-commit] pypy default: try hard to package correct runtime
Matti Picus
noreply at buildbot.pypy.org
Mon Mar 26 00:08:25 CEST 2012
Author: Matti Picus <matti at picus.org.il>
Branch:
Changeset: r53979:35e8484be187
Date: 2012-03-26 00:07 +0200
http://bitbucket.org/pypy/pypy/changeset/35e8484be187/
Log: try hard to package correct runtime
diff --git a/pypy/tool/release/package.py b/pypy/tool/release/package.py
--- a/pypy/tool/release/package.py
+++ b/pypy/tool/release/package.py
@@ -58,9 +58,33 @@
binaries = [(pypy_c, rename_pypy_c)]
#
if sys.platform == 'win32':
+ #What runtime do we need?
+ msvc_runtime = 'msvcr80.dll' #default is studio 2005 vc8
+ try:
+ import subprocess
+ out,err = subprocess.Popen([str(pypy_c), '-c',
+ 'import sys; print sys.version'],
+ stdout=subprocess.PIPE).communicate()
+ indx=out.find('MSC v.') + 6
+ if indx> 10:
+ if out[indx:].startswith('1600'):
+ msvc_runtime = 'msvcr100.dll' #studio 2010 vc10
+ elif out[indx:].startwith('1500'):
+ msvc_runtime = 'msvcr90.dll' #studio 2009 vc9
+ elif out[indx:].startswith('1400'):
+ msvc_runtime = 'msvcr80.dll' #studio 2005 vc8
+ else:
+ print 'Cannot determine runtime dll for pypy' \
+ ' version "%s"'%out
+ else:
+ print 'Cannot determine runtime dll for pypy' \
+ ' version "%s"'%out
+ except :
+ pass
# Can't rename a DLL: it is always called 'libpypy-c.dll'
+
for extra in ['libpypy-c.dll',
- 'libexpat.dll', 'sqlite3.dll', 'msvcr100.dll',
+ 'libexpat.dll', 'sqlite3.dll', msvc_runtime,
'libeay32.dll', 'ssleay32.dll']:
p = pypy_c.dirpath().join(extra)
if not p.check():
More information about the pypy-commit
mailing list