From: Daira Hopwood Date: Thu, 18 Apr 2013 21:45:04 +0000 (+0100) Subject: Cleanup to declare not_import_versionable and ignorable packages in _auto_deps.py X-Git-Url: https://git.rkrishnan.org/webform_css?a=commitdiff_plain;h=564f6c799ad882f6503ce2764dc9ad76b6e45fa6;p=tahoe-lafs%2Ftahoe-lafs.git Cleanup to declare not_import_versionable and ignorable packages in _auto_deps.py Signed-off-by: Daira Hopwood --- diff --git a/src/allmydata/__init__.py b/src/allmydata/__init__.py index 694b6e6c..d17abfaa 100644 --- a/src/allmydata/__init__.py +++ b/src/allmydata/__init__.py @@ -280,10 +280,12 @@ def cross_check_pkg_resources_versus_import(): def cross_check(pkg_resources_vers_and_locs, imported_vers_and_locs_list): """This function returns a list of errors due to any failed cross-checks.""" + from _auto_deps import not_import_versionable_packages, ignorable_packages + errors = [] not_pkg_resourceable = set(['python', 'platform', __appname__.lower()]) - not_import_versionable = set(['zope.interface', 'mock', 'pyasn1', 'python-gflags']) - ignorable = set(['argparse', 'pyutil', 'zbase32', 'distribute', 'twisted-web', 'twisted-core', 'twisted-conch', 'six']) + not_import_versionable = set(not_import_versionable_packages) + ignorable = set(ignorable_packages) for name, (imp_ver, imp_loc, imp_comment) in imported_vers_and_locs_list: name = name.lower() diff --git a/src/allmydata/_auto_deps.py b/src/allmydata/_auto_deps.py index 63bf7576..527253b1 100644 --- a/src/allmydata/_auto_deps.py +++ b/src/allmydata/_auto_deps.py @@ -99,6 +99,13 @@ package_imports = [ ('python-gflags', 'gflags'), ] +# Packages we cannot find a version number for by importing. +not_import_versionable_packages = ('zope.interface', 'mock', 'pyasn1', 'python-gflags') + +# Packages that pkg_resources might report, but we don't care about checking their version. +ignorable_packages = ('argparse', 'pyutil', 'zbase32', 'distribute', 'twisted-web', 'twisted-core', 'twisted-conch', 'six') + + def require_more(): import sys