2007-05-01 20:23:15 +00:00
|
|
|
|
2007-04-19 20:47:59 +00:00
|
|
|
"""
|
2007-04-30 20:06:09 +00:00
|
|
|
Decentralized storage grid.
|
2007-04-19 20:47:59 +00:00
|
|
|
|
|
|
|
maintainer web site: U{http://allmydata.com/}
|
|
|
|
|
|
|
|
community web site: U{http://allmydata.org/}
|
|
|
|
"""
|
|
|
|
|
2007-05-04 03:14:07 +00:00
|
|
|
__version__ = "unknown"
|
|
|
|
try:
|
2007-08-16 21:09:30 +00:00
|
|
|
from _version import __version__
|
2007-05-04 03:14:07 +00:00
|
|
|
except ImportError:
|
2008-01-22 17:22:51 +00: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-04 03:14:07 +00:00
|
|
|
pass
|
2007-04-19 20:47:59 +00:00
|
|
|
|
2007-05-04 03:14:07 +00:00
|
|
|
hush_pyflakes = __version__
|
|
|
|
del hush_pyflakes
|
2007-04-19 20:47:59 +00:00
|
|
|
|
2008-01-23 00:42:54 +00:00
|
|
|
try:
|
|
|
|
import pkg_resources
|
|
|
|
except ImportError:
|
|
|
|
# nevermind
|
|
|
|
pass
|
|
|
|
else:
|
|
|
|
pkg_resources.require("zfec >= 1.3.0")
|
|
|
|
pkg_resources.require("foolscap >= 0.2.3")
|
|
|
|
pkg_resources.require("simplejson >= 1.7.3")
|
|
|
|
pkg_resources.require("pycryptopp >= 0.2.9")
|
|
|
|
pkg_resources.require("nevow >= 0.6.0")
|
|
|
|
pkg_resources.require("zope.interface >= 3.1.0")
|
|
|
|
|
2007-12-13 02:37:37 +00:00
|
|
|
def get_package_versions():
|
2008-01-05 03:53:41 +00: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-13 02:37:37 +00:00
|
|
|
return {
|
|
|
|
'pyopenssl': OpenSSL.__version__,
|
|
|
|
'allmydata': allmydata.__version__,
|
|
|
|
'foolscap': foolscap.__version__,
|
|
|
|
'nevow': nevow.__version__,
|
|
|
|
'pycryptopp': pycryptopp.__version__,
|
2008-01-05 03:53:41 +00:00
|
|
|
'setuptools': setuptools_version,
|
2007-12-13 02:37:37 +00: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)
|