From: Zooko O'Whielacronx Date: Mon, 10 May 2010 06:29:55 +0000 (-0700) Subject: setup: show code-coverage tool versions in show-tools-versions.py X-Git-Url: https://git.rkrishnan.org/vdrive/%22file:/frontends/%22doc.html/cyclelanguage?a=commitdiff_plain;h=77189291c40c9074d895399ae21274e10ea4e94f;p=tahoe-lafs%2Ftahoe-lafs.git setup: show code-coverage tool versions in show-tools-versions.py --- diff --git a/misc/show-tool-versions.py b/misc/show-tool-versions.py index ee111dc3..7f1e84db 100644 --- a/misc/show-tool-versions.py +++ b/misc/show-tool-versions.py @@ -73,3 +73,28 @@ 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 + except pkg_resources.DistributionNotFound, le: + sys.stderr.write("pkg_resources reported no trialcoverage package installed: %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 + except pkg_resources.DistributionNotFound, le: + sys.stderr.write("pkg_resources reported no trialcoverage package installed: %s" % (le,)) + pass +