2009-02-19 08:35:58 +00:00
|
|
|
#! /usr/bin/env python
|
|
|
|
|
2010-05-04 04:56:43 +00:00
|
|
|
import os, subprocess, sys
|
|
|
|
|
|
|
|
try:
|
|
|
|
import platform
|
|
|
|
out = platform.platform()
|
|
|
|
print
|
|
|
|
print "platform:", out.replace("\n", " ")
|
|
|
|
except EnvironmentError, le:
|
|
|
|
sys.stderr.write("Got exception using 'platform': %s" % (le,))
|
|
|
|
pass
|
2009-02-19 08:35:58 +00:00
|
|
|
|
2009-07-09 00:45:33 +00:00
|
|
|
print "python:", sys.version.replace("\n", " ") + ', maxunicode: ' + str(sys.maxunicode)
|
2009-02-19 08:35:58 +00:00
|
|
|
|
2010-05-04 04:56:43 +00:00
|
|
|
try:
|
|
|
|
import pkg_resources
|
|
|
|
out = str(pkg_resources.require("setuptools"))
|
|
|
|
print
|
|
|
|
print "setuptools:", out.replace("\n", " ")
|
|
|
|
except (ImportError, EnvironmentError), le:
|
|
|
|
sys.stderr.write("Got exception using 'pkg_resources' to get the version of setuptools: %s" % (le,))
|
|
|
|
pass
|
|
|
|
|
2009-02-19 08:35:58 +00:00
|
|
|
try:
|
|
|
|
out = subprocess.Popen(["buildbot", "--version"],
|
|
|
|
stdout=subprocess.PIPE).communicate()[0]
|
|
|
|
print "buildbot:", out.replace("\n", " ")
|
2010-05-04 04:56:43 +00:00
|
|
|
except EnvironmentError, le:
|
|
|
|
sys.stderr.write("Got exception invoking 'buildbot': %s" % (le,))
|
2009-02-19 08:35:58 +00:00
|
|
|
pass
|
|
|
|
|
|
|
|
try:
|
2010-05-04 04:56:43 +00:00
|
|
|
out = subprocess.Popen(["cl"],
|
2009-02-19 08:35:58 +00:00
|
|
|
stdout=subprocess.PIPE).communicate()[0]
|
2010-05-04 04:56:43 +00:00
|
|
|
print "cl:", out.replace("\n", " ")
|
|
|
|
except EnvironmentError, le:
|
|
|
|
sys.stderr.write("Got exception invoking 'cl': %s" % (le,))
|
2009-06-21 05:58:46 +00:00
|
|
|
pass
|
|
|
|
|
|
|
|
try:
|
2010-05-04 04:56:43 +00:00
|
|
|
out = subprocess.Popen(["g++", "--version"],
|
|
|
|
stdout=subprocess.PIPE).communicate()[0]
|
|
|
|
print "g++:", out.replace("\n", " ")
|
|
|
|
except EnvironmentError, le:
|
|
|
|
sys.stderr.write("Got exception invoking 'g++': %s" % (le,))
|
2009-06-21 05:58:46 +00:00
|
|
|
pass
|
|
|
|
|
|
|
|
try:
|
2010-05-04 04:56:43 +00:00
|
|
|
out = subprocess.Popen(["gcc", "--version"],
|
|
|
|
stdout=subprocess.PIPE).communicate()[0]
|
|
|
|
print "gcc:", out.replace("\n", " ")
|
|
|
|
except EnvironmentError, le:
|
|
|
|
sys.stderr.write("Got exception invoking 'gcc': %s" % (le,))
|
|
|
|
pass
|
|
|
|
|
|
|
|
try:
|
|
|
|
out = subprocess.Popen(["as", "-version"], stdin=open(os.devnull),
|
|
|
|
stdout=subprocess.PIPE).communicate()[0]
|
|
|
|
print "as:", out.replace("\n", " ")
|
|
|
|
except EnvironmentError, le:
|
|
|
|
sys.stderr.write("Got exception invoking 'as': %s" % (le,))
|
|
|
|
pass
|
|
|
|
|
|
|
|
try:
|
|
|
|
out = subprocess.Popen(["darcs", "--version"],
|
|
|
|
stdout=subprocess.PIPE).communicate()[0]
|
|
|
|
full = subprocess.Popen(["darcs", "--exact-version"],
|
|
|
|
stdout=subprocess.PIPE).communicate()[0]
|
2009-06-21 05:58:46 +00:00
|
|
|
print
|
2010-05-04 04:56:43 +00:00
|
|
|
print "darcs:", out.replace("\n", " ")
|
|
|
|
print full.rstrip()
|
|
|
|
except EnvironmentError, le:
|
|
|
|
sys.stderr.write("Got exception invoking 'darcs': %s" % (le,))
|
2009-02-19 08:35:58 +00:00
|
|
|
pass
|
2010-05-10 06:29:55 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
|