From: zooko Date: Mon, 10 May 2010 04:43:13 +0000 (+0530) Subject: setup: report on coverage.py and trialcoverage versions X-Git-Url: https://git.rkrishnan.org/simplejson/components/(%5B%5E?a=commitdiff_plain;h=fd78c26dc3aacc520b544a5ebcba9ee4c3cfbc3b;p=tahoe-lafs%2Fzfec.git setup: report on coverage.py and trialcoverage versions Ignore-this: a1b181bccb2bf8c130adfa8f1c4cf13e darcs-hash:e7eca9eb66bb070717fe64f1618b215125256757 --- diff --git a/misc/show-tool-versions.py b/misc/show-tool-versions.py index 8f83403..73582d9 100755 --- a/misc/show-tool-versions.py +++ b/misc/show-tool-versions.py @@ -57,3 +57,21 @@ try: except EnvironmentError, le: sys.stderr.write("Got exception invoking 'darcs': %s" % (le,)) pass + +try: + import pkg_resources + out = str(pkg_resources.require("coverage")) + print + print "coverage:", out.replace("\n", " ") +except (ImportError, EnvironmentError), le: + sys.stderr.write("Got exception using 'pkg_resources' to get the version of coverage: %s" % (le,)) + pass + +try: + import pkg_resources + out = str(pkg_resources.require("trialcoverage")) + print + print "trialcoverage:", out.replace("\n", " ") +except (ImportError, EnvironmentError), le: + sys.stderr.write("Got exception using 'pkg_resources' to get the version of trialcoverage: %s" % (le,)) + pass