Author: Armin Rigo <[email protected]>
Branch:
Changeset: r47851:3ad9eefabff2
Date: 2011-10-07 08:34 +0200
http://bitbucket.org/pypy/pypy/changeset/3ad9eefabff2/
Log: Clean up more the win32 logic, sharing more code with Posix. Now it
should create a "pypy.exe" instead of "pypy-c.exe", which was
apparently considered confusing by people on pypy-dev.
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
@@ -43,34 +43,29 @@
def package(basedir, name='pypy-nightly', rename_pypy_c='pypy',
copy_to_dir = None, override_pypy_c = None):
basedir = py.path.local(basedir)
+ if override_pypy_c is None:
+ basename = 'pypy-c'
+ if sys.platform == 'win32':
+ basename += '.exe'
+ pypy_c = basedir.join('pypy', 'translator', 'goal', basename)
+ else:
+ pypy_c = py.path.local(override_pypy_c)
+ if not pypy_c.check():
+ print pypy_c
+ raise PyPyCNotFound('Please compile pypy first, using translate.py')
+ binaries = [(pypy_c, rename_pypy_c)]
+ #
if sys.platform == 'win32':
- # Can't rename a DLL
- if override_pypy_c is not None:
- rename_pypy_c = py.path.local(override_pypy_c).purebasename
- pypy_c_dir = py.path.local(override_pypy_c).dirname
- else:
- pypy_c_dir = basedir.join('pypy', 'translator', 'goal')
- pypy_c = pypy_c_dir.join(rename_pypy_c + '.exe')
- libpypy_c = pypy_c_dir.join('lib' + rename_pypy_c + '.dll')
- binaries = [(pypy_c, pypy_c.basename),
- (libpypy_c, libpypy_c.basename)]
- for extra in ['libexpat.dll', 'sqlite3.dll', 'msvcr90.dll']:
- p = pypy_c_dir.join(extra)
+ # Can't rename a DLL: it is always called 'libpypy_c.dll'
+ for extra in ['libpypy_c.dll',
+ 'libexpat.dll', 'sqlite3.dll', 'msvcr90.dll']:
+ p = pypy_c.dirpath().join(extra)
if not p.check():
p = py.path.local.sysfind(extra)
assert p, "%s not found" % (extra,)
print "Picking %s" % p
binaries.append((p, p.basename))
- else:
- basename = 'pypy-c'
- if override_pypy_c is None:
- pypy_c = basedir.join('pypy', 'translator', 'goal', basename)
- else:
- pypy_c = py.path.local(override_pypy_c)
- binaries = [(pypy_c, rename_pypy_c)]
- if not pypy_c.check():
- print pypy_c
- raise PyPyCNotFound('Please compile pypy first, using translate.py')
+ #
builddir = udir.ensure("build", dir=True)
pypydir = builddir.ensure(name, dir=True)
# Careful: to copy lib_pypy, copying just the svn-tracked files
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit