setup: copy in misc/show-tools-version.py from zfec -- it prints out platform and...
authorZooko O'Whielacronx <zooko@zooko.com>
Sun, 21 Jun 2009 05:58:46 +0000 (22:58 -0700)
committerZooko O'Whielacronx <zooko@zooko.com>
Sun, 21 Jun 2009 05:58:46 +0000 (22:58 -0700)
misc/show-tool-versions.py

index 98a9c4d4f9ff1d5e3e0e299ec3c73661f411f993..95e84a27d749669a10df1b66c6141def38d746ab 100644 (file)
@@ -9,7 +9,7 @@ try:
     out = subprocess.Popen(["buildbot", "--version"],
                            stdout=subprocess.PIPE).communicate()[0]
     print "buildbot:", out.replace("\n", " ")
-except OSError:
+except EnvironmentError:
     pass
 
 try:
@@ -20,5 +20,21 @@ try:
     print
     print "darcs:", out.replace("\n", " ")
     print full.rstrip()
-except OSError:
+except EnvironmentError:
+    pass
+
+try:
+    import platform
+    out = platform.platform()
+    print
+    print "platform:", out.replace("\n", " ")
+except EnvironmentError:
+    pass
+
+try:
+    import pkg_resources
+    out = str(pkg_resources.require("setuptools"))
+    print
+    print "setuptools:", out.replace("\n", " ")
+except (ImportError, EnvironmentError):
     pass