2007-05-01 13:23:15 -07:00
|
|
|
|
2007-04-19 13:47:59 -07:00
|
|
|
"""
|
2007-04-30 13:06:09 -07:00
|
|
|
Decentralized storage grid.
|
2007-04-19 13:47:59 -07:00
|
|
|
|
|
|
|
maintainer web site: U{http://allmydata.com/}
|
|
|
|
|
|
|
|
community web site: U{http://allmydata.org/}
|
|
|
|
"""
|
|
|
|
|
2007-05-03 20:14:07 -07:00
|
|
|
__version__ = "unknown"
|
|
|
|
try:
|
2007-08-16 14:09:30 -07:00
|
|
|
from _version import __version__
|
2007-05-03 20:14:07 -07:00
|
|
|
except ImportError:
|
2008-01-22 10:22:51 -07:00
|
|
|
# We're running in a tree that hasn't run "./setup.py darcsver", and didn't
|
|
|
|
# come with a _version.py, so we don't know what our version is. This should
|
|
|
|
# not happen very often.
|
2007-05-03 20:14:07 -07:00
|
|
|
pass
|
2007-04-19 13:47:59 -07:00
|
|
|
|
2007-05-03 20:14:07 -07:00
|
|
|
hush_pyflakes = __version__
|
|
|
|
del hush_pyflakes
|
2007-04-19 13:47:59 -07:00
|
|
|
|
2008-04-30 13:22:04 -07:00
|
|
|
import _auto_deps
|
|
|
|
_auto_deps.require_auto_deps()
|
2008-01-22 17:42:54 -07:00
|
|
|
|
2007-12-12 19:37:37 -07:00
|
|
|
def get_package_versions():
|
2008-01-04 20:53:41 -07:00
|
|
|
import OpenSSL, allmydata, foolscap, nevow, pycryptopp, simplejson, twisted, zfec
|
|
|
|
setuptools_version = "unavailable"
|
|
|
|
try:
|
|
|
|
import setuptools
|
|
|
|
setuptools_version = setuptools.__version__
|
|
|
|
except ImportError:
|
|
|
|
pass
|
2007-12-12 19:37:37 -07:00
|
|
|
return {
|
|
|
|
'pyopenssl': OpenSSL.__version__,
|
|
|
|
'allmydata': allmydata.__version__,
|
|
|
|
'foolscap': foolscap.__version__,
|
|
|
|
'nevow': nevow.__version__,
|
|
|
|
'pycryptopp': pycryptopp.__version__,
|
2008-01-04 20:53:41 -07:00
|
|
|
'setuptools': setuptools_version,
|
2007-12-12 19:37:37 -07:00
|
|
|
'simplejson': simplejson.__version__,
|
|
|
|
'twisted': twisted.__version__,
|
|
|
|
'zfec': zfec.__version__,
|
|
|
|
}
|
|
|
|
|
|
|
|
def get_package_versions_string():
|
|
|
|
versions = get_package_versions()
|
|
|
|
res = []
|
|
|
|
for p in ["allmydata", "foolscap", "pycryptopp", "zfec", "twisted", "nevow"]:
|
|
|
|
if versions.has_key(p):
|
|
|
|
res.append(str(p) + ": " + str(versions[p]))
|
|
|
|
del versions[p]
|
|
|
|
else:
|
|
|
|
res.append(str(p) + ": UNKNOWN")
|
|
|
|
for p, v in versions.iteritems():
|
|
|
|
res.append(str(p) + ": " + str(v))
|
|
|
|
return ', '.join(res)
|