[pypy-dev] [pypy-svn] r72100 - pypy/trunk/pypy/tool
Maciej Fijalkowski
fijall at gmail.com
Thu Mar 11 16:45:37 CET 2010
This comes with no test.
On Thu, Mar 11, 2010 at 6:17 AM, <arigo at codespeak.net> wrote:
> Author: arigo
> Date: Thu Mar 11 14:17:44 2010
> New Revision: 72100
>
> Modified:
> pypy/trunk/pypy/tool/package.py
> Log:
> Accept a third argument: the name to give to the pypy-c.
>
>
> Modified: pypy/trunk/pypy/tool/package.py
> ==============================================================================
> --- pypy/trunk/pypy/tool/package.py (original)
> +++ pypy/trunk/pypy/tool/package.py Thu Mar 11 14:17:44 2010
> @@ -2,7 +2,7 @@
> """ A sample script that packages PyPy, provided that it's already built.
> Usage:
>
> -package.py pypydir [name-of-archive]
> +package.py pypydir [name-of-archive] [name-of-pypy-c]
> """
>
> import autopath
> @@ -31,7 +31,7 @@
> class PyPyCNotFound(Exception):
> pass
>
> -def main(basedir, name='pypy-nightly'):
> +def main(basedir, name='pypy-nightly', rename_pypy_c='pypy-c'):
> basedir = py.path.local(basedir)
> pypy_c = basedir.join('pypy', 'translator', 'goal', 'pypy-c')
> if not pypy_c.check():
> @@ -50,11 +50,12 @@
> for file in ['LICENSE', 'README']:
> shutil.copy(str(basedir.join(file)), str(pypydir))
> pypydir.ensure('bin', dir=True)
> - shutil.copy(str(pypy_c), str(pypydir.join('bin', 'pypy-c')))
> + archive_pypy_c = pypydir.join('bin', rename_pypy_c)
> + shutil.copy(str(pypy_c), str(archive_pypy_c))
> old_dir = os.getcwd()
> try:
> os.chdir(str(builddir))
> - os.system("strip " + str(pypydir.join('bin', 'pypy-c')))
> + os.system("strip " + str(archive_pypy_c))
> os.system('tar cvjf ' + str(builddir.join(name + '.tar.bz2')) +
> " " + name)
> finally:
> @@ -62,10 +63,8 @@
> return builddir # for tests
>
> if __name__ == '__main__':
> - if len(sys.argv) == 1 or len(sys.argv) > 3:
> + if len(sys.argv) == 1 or len(sys.argv) > 4:
> print >>sys.stderr, __doc__
> sys.exit(1)
> - elif len(sys.argv) == 2:
> - main(sys.argv[1])
> else:
> - main(sys.argv[1], sys.argv[2])
> + main(*sys.argv[1:])
> _______________________________________________
> pypy-svn mailing list
> pypy-svn at codespeak.net
> http://codespeak.net/mailman/listinfo/pypy-svn
>
More information about the Pypy-dev
mailing list