2008-01-23 00:35:38 +00:00
|
|
|
install_requires=["zfec >= 1.1.0",
|
2008-01-23 00:24:33 +00:00
|
|
|
"foolscap >= 0.2.3",
|
2008-01-23 20:03:09 +00:00
|
|
|
"simplejson >= 1.4",
|
2008-01-23 18:00:35 +00:00
|
|
|
"pycryptopp >= 0.2.8",
|
2008-01-23 00:24:33 +00:00
|
|
|
"nevow >= 0.6.0",
|
2008-01-23 18:26:04 +00:00
|
|
|
"zope.interface",
|
2008-01-23 00:24:33 +00:00
|
|
|
]
|
2008-01-23 02:32:55 +00:00
|
|
|
import sys
|
|
|
|
if hasattr(sys, 'frozen'):
|
|
|
|
install_requires=[]
|
2008-01-23 00:24:33 +00:00
|
|
|
|
|
|
|
def require_auto_deps():
|
|
|
|
try:
|
|
|
|
import pkg_resources
|
|
|
|
except:
|
|
|
|
# Then we can't assert that the versions of these packages are the right
|
|
|
|
# versions, but we can still try to use them anyway...
|
|
|
|
pass
|
|
|
|
else:
|
|
|
|
for requirement in install_requires:
|
2008-01-29 20:52:37 +00:00
|
|
|
try:
|
|
|
|
pkg_resources.require(requirement)
|
|
|
|
except pkg_resources.DistributionNotFound:
|
|
|
|
# there is no .egg-info present for this requirement, which
|
|
|
|
# either means that it isn't installed, or it is installed in
|
2008-01-29 20:53:21 +00:00
|
|
|
# a way that pkg_resources can't find it (but regular python
|
2008-01-29 20:52:37 +00:00
|
|
|
# might). The __import__ below will pass the second case,
|
|
|
|
# which is good enough for us. There are several
|
|
|
|
# distributions which provide our dependencies just fine, but
|
2008-01-29 20:53:21 +00:00
|
|
|
# they don't ship .egg-info files. Note that if there *is* an
|
|
|
|
# .egg-info file, but it indicates an older version, then
|
|
|
|
# we'll get a VersionConflict error instead of
|
|
|
|
# DistributionNotFound.
|
2008-01-29 20:52:37 +00:00
|
|
|
pass
|
2008-01-23 00:24:33 +00:00
|
|
|
for requirement in install_requires:
|
2008-01-23 18:26:04 +00:00
|
|
|
reqparts = requirement.split()
|
|
|
|
name = reqparts[0]
|
2008-01-23 00:24:33 +00:00
|
|
|
__import__(name)
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
require_auto_deps()
|