mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-06-19 07:48:11 +00:00
Latest cryptography depends on enum34.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
This commit is contained in:
committed by
Brian Warner
parent
ef455df990
commit
e73d76eb1b
@ -188,8 +188,17 @@ def get_package_versions_and_locations():
|
|||||||
|
|
||||||
packages = []
|
packages = []
|
||||||
|
|
||||||
def get_version(module, attr):
|
def get_version(module):
|
||||||
return str(getattr(module, attr, 'unknown'))
|
if hasattr(module, '__version__'):
|
||||||
|
return str(getattr(module, '__version__'))
|
||||||
|
elif hasattr(module, 'version'):
|
||||||
|
ver = getattr(module, 'version')
|
||||||
|
if isinstance(ver, tuple):
|
||||||
|
return '.'.join(map(str, ver))
|
||||||
|
else:
|
||||||
|
return str(ver)
|
||||||
|
else:
|
||||||
|
return 'unknown'
|
||||||
|
|
||||||
for pkgname, modulename in [(__appname__, 'allmydata')] + package_imports:
|
for pkgname, modulename in [(__appname__, 'allmydata')] + package_imports:
|
||||||
if modulename:
|
if modulename:
|
||||||
@ -207,7 +216,7 @@ def get_package_versions_and_locations():
|
|||||||
elif pkgname == 'setuptools' and hasattr(module, '_distribute'):
|
elif pkgname == 'setuptools' and hasattr(module, '_distribute'):
|
||||||
# distribute does not report its version in any module variables
|
# distribute does not report its version in any module variables
|
||||||
comment = 'distribute'
|
comment = 'distribute'
|
||||||
packages.append( (pkgname, (get_version(module, '__version__'), package_dir(module.__file__), comment)) )
|
packages.append( (pkgname, (get_version(module), package_dir(module.__file__), comment)) )
|
||||||
elif pkgname == 'python':
|
elif pkgname == 'python':
|
||||||
packages.append( (pkgname, (platform.python_version(), sys.executable, None)) )
|
packages.append( (pkgname, (platform.python_version(), sys.executable, None)) )
|
||||||
elif pkgname == 'platform':
|
elif pkgname == 'platform':
|
||||||
|
@ -204,6 +204,7 @@ if _can_use_pyOpenSSL_0_14:
|
|||||||
"cryptography",
|
"cryptography",
|
||||||
"cffi >= 0.8", # latest cryptography depends on this version
|
"cffi >= 0.8", # latest cryptography depends on this version
|
||||||
"six >= 1.4.1", # latest cryptography depends on this version
|
"six >= 1.4.1", # latest cryptography depends on this version
|
||||||
|
"enum34", # latest cryptography depends on this
|
||||||
"pycparser", # cffi depends on this
|
"pycparser", # cffi depends on this
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -211,6 +212,7 @@ if _can_use_pyOpenSSL_0_14:
|
|||||||
('cryptography', 'cryptography'),
|
('cryptography', 'cryptography'),
|
||||||
('cffi', 'cffi'),
|
('cffi', 'cffi'),
|
||||||
('six', 'six'),
|
('six', 'six'),
|
||||||
|
('enum34', 'enum'),
|
||||||
('pycparser', 'pycparser'),
|
('pycparser', 'pycparser'),
|
||||||
]
|
]
|
||||||
else:
|
else:
|
||||||
|
Reference in New Issue
Block a user