From: W. Trevor King Date: Sun, 30 Dec 2012 18:24:51 +0000 (-0500) Subject: swc-installation-test-2.py: Fix version extraction for sqlite3-python X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=2d45e1954f8ffb1225386e47aa6d8db84d106c7a;p=swc-setup-installation-test.git 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. --- 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(