[pypy-svn] r9963 - pypy/dist/pypy/tool

hpk at codespeak.net hpk at codespeak.net
Sun Mar 20 23:51:53 CET 2005


Author: hpk
Date: Sun Mar 20 23:51:53 2005
New Revision: 9963

Added:
   pypy/dist/pypy/tool/pypyrev.py
Log:
this provides a possibility to find out 
the revision number of the current 'pypy' package
in use. 


Added: pypy/dist/pypy/tool/pypyrev.py
==============================================================================
--- (empty file)
+++ pypy/dist/pypy/tool/pypyrev.py	Sun Mar 20 23:51:53 2005
@@ -0,0 +1,15 @@
+
+import pypy
+import py
+
+def pypyrev(cache=[]): 
+    """ return subversion revision number for current pypy package. 
+    """
+    try:
+        return cache[0]
+    except IndexError: 
+        pypydir = py.path.svnwc(pypy.__file__).dirpath()
+        rev = pypydir.info().rev 
+        cache.append(rev) 
+        return rev 
+



More information about the Pypy-commit mailing list