[pypy-commit] pypy default: add a script to download the latest nightly and extract the pypy binary in the current directory

antocuni noreply at buildbot.pypy.org
Fri Mar 15 15:29:49 CET 2013


Author: Antonio Cuni <anto.cuni at gmail.com>
Branch: 
Changeset: r62354:d572df7a5ac4
Date: 2013-03-15 15:29 +0100
http://bitbucket.org/pypy/pypy/changeset/d572df7a5ac4/

Log:	add a script to download the latest nightly and extract the pypy
	binary in the current directory

diff --git a/pypy/goal/getnightly.py b/pypy/goal/getnightly.py
new file mode 100755
--- /dev/null
+++ b/pypy/goal/getnightly.py
@@ -0,0 +1,27 @@
+#!/usr/bin/env python
+
+import sys
+import os
+import py
+
+if sys.platform.startswith('linux'):
+    arch = 'linux'
+else:
+    print 'Cannot determine the platform, please update this scrip'
+    sys.exit(1)
+
+if sys.maxint == 2**63 - 1:
+    arch += '64'
+
+filename = 'pypy-c-jit-latest-%s.tar.bz2' % arch
+url = 'http://buildbot.pypy.org/nightly/trunk/%s' % filename
+tmp = py.path.local.mkdtemp()
+mydir = tmp.chdir()
+print 'Downloading pypy to', tmp
+if os.system('wget "%s"' % url) != 0:
+    sys.exit(1)
+
+print 'Extracting pypy binary'
+mydir.chdir()
+os.system("tar -x -v --wildcards --strip-components=2 -f %s '*/bin/pypy'" % tmp.join(filename))
+


More information about the pypy-commit mailing list