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:
|
2008-01-23 00:24:33 +00:00
|
|
|
import _auto_deps
|
2008-01-23 00:42:54 +00:00
|
|
|
except ImportError:
|
2008-01-23 00:24:33 +00:00
|
|
|
# Never mind -- even if we can't use pkg_resources to check the required
|
|
|
|
# version numbers and to select the right one in the case that more than one
|
|
|
|
# version is available, we can still barrel on and if "import thingie" gives
|
|
|
|
# us a thingie that works, we're okay.
|
2008-01-23 00:42:54 +00:00
|
|
|
pass
|
|
|
|
else:
|
2008-01-23 00:24:33 +00:00
|
|
|
_auto_deps.require_auto_deps()
|
2008-01-23 00:42:54 +00:00
|
|
|
|
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)
|