From 2d45e1954f8ffb1225386e47aa6d8db84d106c7a Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Sun, 30 Dec 2012 13:24:51 -0500 Subject: [PATCH] swc-installation-test-2.py: Fix version extraction for sqlite3-python The 'sqlite3' package has the same version as the standard library. We only check for it because sometimes (e.g. on Gentoo) Python may be compiled without this package. --- swc-installation-test-2.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/swc-installation-test-2.py b/swc-installation-test-2.py index 7e1f731..f1101ed 100755 --- a/swc-installation-test-2.py +++ b/swc-installation-test-2.py @@ -355,8 +355,6 @@ class PythonPackageDependency (Dependency): for package,name,long_name,minimum_version in [ ('nose', None, 'Nose Python package', CHECKER['nosetests'].minimum_version), - ('sqlite3', 'sqlite3-python', 'SQLite Python package', - CHECKER['sqlite3'].minimum_version), ('IPython', None, None, None), ('numpy', None, 'NumPy', None), ('scipy', None, 'SciPy', None), @@ -394,6 +392,20 @@ CHECKER['mercurial'] = MercurialPythonPackage( minimum_version=CHECKER['hg'].minimum_version) +class SQLitePythonPackage (PythonPackageDependency): + def _get_version_from_package(self, package): + return _sys.version + + def _get_parsed_version(self): + return _sys.version_info + + +CHECKER['sqlite3-python'] = SQLitePythonPackage( + package='sqlite3', name='sqlite3-python', + long_name='SQLite Python package', + minimum_version=CHECKER['sqlite3'].minimum_version) + + class VirtualDependency (Dependency): def _check(self): return '{0} {1}'.format( -- 2.26.2