[prev in list] [next in list] [prev in thread] [next in thread]
List: pypy-svn
Subject: [pypy-commit] pypy default: add version_info to numpypy status page
From: mattip <noreply () buildbot ! pypy ! org>
Date: 2013-07-30 21:00:52
Message-ID: 20130730210052.BE4231C01F6 () cobra ! cs ! uni-duesseldorf ! de
[Download RAW message or body]
Author: Matti Picus <matti.picus@gmail.com>
Branch:
Changeset: r65830:6bec82bea284
Date: 2013-07-30 23:59 +0300
http://bitbucket.org/pypy/pypy/changeset/6bec82bea284/
Log: add version_info to numpypy status page
diff --git a/pypy/module/micronumpy/tool/numready/main.py \
b/pypy/module/micronumpy/tool/numready/main.py
--- a/pypy/module/micronumpy/tool/numready/main.py
+++ b/pypy/module/micronumpy/tool/numready/main.py
@@ -78,6 +78,11 @@
items.add(Item(name, kind, subitems))
return items
+def get_version_str(python):
+ args = [python, '-c', 'import sys; print sys.version']
+ lines = subprocess.check_output(args).splitlines()
+ return lines[0]
+
def split(lst):
SPLIT = 5
lgt = len(lst) // SPLIT + 1
@@ -93,6 +98,7 @@
def main(argv):
cpy_items = find_numpy_items("/usr/bin/python")
pypy_items = find_numpy_items(argv[1], "numpypy")
+ ver = get_version_str(argv[1])
all_items = []
msg = "{:d}/{:d} names".format(len(pypy_items), len(cpy_items)) + " "
@@ -113,7 +119,8 @@
env = jinja2.Environment(
loader=jinja2.FileSystemLoader(os.path.dirname(__file__))
)
- html = env.get_template("page.html").render(all_items=split(sorted(all_items)), \
msg=msg) + html = \
env.get_template("page.html").render(all_items=split(sorted(all_items)), + \
msg=msg, ver=ver) if len(argv) > 2:
with open(argv[2], 'w') as f:
f.write(html.encode("utf-8"))
diff --git a/pypy/module/micronumpy/tool/numready/page.html \
b/pypy/module/micronumpy/tool/numready/page.html
--- a/pypy/module/micronumpy/tool/numready/page.html
+++ b/pypy/module/micronumpy/tool/numready/page.html
@@ -34,6 +34,7 @@
</head>
<body>
<h1>NumPyPy Status</h1>
+ <h3>Version: {{ ver }}</h3>
<h3>Overall: {{ msg }}</h3>
<table>
<thead>
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
http://mail.python.org/mailman/listinfo/pypy-commit
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic