mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-03-11 06:43:54 +00:00
Using pkg_resources.require() like this also apparently allows people to install multiple different versions of packages on their system and tahoe (if pkg_resources is available to it) will import the version of the package that it requires. I haven't tested this feature.
25 lines
760 B
Python
25 lines
760 B
Python
install_requires=["zfec >= 1.3.0",
|
|
"foolscap >= 0.2.3",
|
|
"simplejson >= 1.7.3",
|
|
"pycryptopp >= 0.2.9",
|
|
"nevow >= 0.6.0",
|
|
"zope.interface >= 3.1.0",
|
|
]
|
|
|
|
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:
|
|
pkg_resources.require(requirement)
|
|
for requirement in install_requires:
|
|
name, cmpop, verstr = requirement.split()
|
|
__import__(name)
|
|
|
|
if __name__ == "__main__":
|
|
require_auto_deps()
|