[pypy-svn] r75766 - pypy/build/bot2/pypybuildbot
antocuni at codespeak.net
antocuni at codespeak.net
Fri Jul 2 15:36:39 CEST 2010
Author: antocuni
Date: Fri Jul 2 15:36:38 2010
New Revision: 75766
Added:
pypy/build/bot2/pypybuildbot/pypylist.py (contents, props changed)
Modified:
pypy/build/bot2/pypybuildbot/master.py
Log:
order the pypy binaries in a way that:
- highest revisions are displayed first
- they are grouped by platform: linux, then linux64, then win32
- they are ordered by features: jit, notjit, stackless
Modified: pypy/build/bot2/pypybuildbot/master.py
==============================================================================
--- pypy/build/bot2/pypybuildbot/master.py (original)
+++ pypy/build/bot2/pypybuildbot/master.py Fri Jul 2 15:36:38 2010
@@ -2,7 +2,7 @@
from buildbot.buildslave import BuildSlave
from buildbot.status.html import WebStatus
from buildbot.process.builder import Builder
-from twisted.web.static import File
+from pypybuildbot.pypylist import PyPyList
# I really wanted to pass logPath to Site
from twisted.web.server import Site
@@ -45,8 +45,8 @@
'windows', 'mac',
'benchmark-run',
'other']))
-status.putChild('nightly', File(os.path.expanduser('~/nightly'),
- defaultType='application/octet-stream'))
+status.putChild('nightly', PyPyList(os.path.expanduser('~/nightly'),
+ defaultType='application/octet-stream'))
pypybuilds = load('pypybuildbot.builds')
Added: pypy/build/bot2/pypybuildbot/pypylist.py
==============================================================================
--- (empty file)
+++ pypy/build/bot2/pypybuildbot/pypylist.py Fri Jul 2 15:36:38 2010
@@ -0,0 +1,36 @@
+from twisted.web.static import File
+import re
+
+# to get the desired order keep in mind that they are reversed at the end, so
+# the highest the value, the bigger the priority
+FEATURES = {
+ 'jit': 100,
+ 'nojit': 50,
+ 'stackless': 10
+ }
+
+PLATFORMS = {
+ 'linux': 100,
+ 'linux64': 50,
+ 'win32': 10,
+ }
+
+def parsename(name):
+ # name is something like pypy-c-jit-75654-linux.tar.bz2
+ try:
+ name2 = name.replace('.tar.bz2', '')
+ exe, backend, features, rev, platform = name2.split('-')
+ except ValueError:
+ return '', name
+ else:
+ return rev, PLATFORMS.get(platform, -1), FEATURES.get(features, -1), name
+
+class PyPyList(File):
+
+ def listNames(self):
+ names = File.listNames(self)
+ items = map(parsename, names)
+ items.sort()
+ items.reverse()
+ return [item[-1] for item in items]
+
More information about the Pypy-commit
mailing list