From: zooko Date: Sat, 30 Oct 2010 06:44:59 +0000 (+0530) Subject: setup: show-tool-versions: emit more information about Python packages, and add Twist... X-Git-Url: https://git.rkrishnan.org/%5B/%5D%20//%22doc.html/%22?a=commitdiff_plain;h=bc038f221274ea56587e0109559e7c274b330484;p=tahoe-lafs%2Fzfec.git 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 --- 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')