From bc038f221274ea56587e0109559e7c274b330484 Mon Sep 17 00:00:00 2001
From: zooko <zooko@zooko.com>
Date: Sat, 30 Oct 2010 12:14:59 +0530
Subject: [PATCH] setup: show-tool-versions: emit more information about Python
 packages, and add Twisted to the set of packages to describe

Ignore-this: 354f6311643ded0eb2eeba763485d43

darcs-hash:b9fd1c2cb20fb674bb4dcd9d3aac7dbdaf3e9b69
---
 misc/build_helpers/show-tool-versions.py | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/misc/build_helpers/show-tool-versions.py b/misc/build_helpers/show-tool-versions.py
index 26846c5..b8f7747 100755
--- a/misc/build_helpers/show-tool-versions.py
+++ b/misc/build_helpers/show-tool-versions.py
@@ -82,6 +82,17 @@ def print_py_pkg_ver(pkgname):
         traceback.print_exc(file=sys.stderr)
         sys.stderr.flush()
         pass
+    try:
+        __import__(pkgname)
+    except ImportError:
+        pass
+    else:
+        modobj = sys.modules.get(pkgname)
+        print pkgname + ' module: ' + str(modobj)
+        try:
+            print pkgname + ' __version__: ' + str(modobj.__version__)
+        except AttributeError:
+            pass
 
 print_platform()
 
@@ -102,3 +113,5 @@ print_py_pkg_ver('trialcoverage')
 print_py_pkg_ver('setuptools_trial')
 print_py_pkg_ver('setuptools_darcs')
 print_py_pkg_ver('darcsver')
+print_py_pkg_ver('twisted')
+print_py_pkg_ver('TwistedCore')
-- 
2.45.2