Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

utils.external_packages: Introduce minimum_version

Some python modules, such as setup tools, might have
a minimum version under which the needed functionality for
autotest is OK. In case of setup tools, any version equal
or higher than 0.6 is OK, but in case the module is completely
missing, we'll install 0.6c11, which is the latest upstream.

So, make possible to specify 'minimum versions' for packages,
if we have that one, make the is_needed check with that version.

Signed-off-by: Lucas Meneghel Rodrigues <>

git-svn-id: svn:// 592f7852-d20e-0410-864c-8624ca9c26a4
  • Loading branch information...
commit d59e5cdc9c0e10f5fc2ff24f03d3a22b9759de58 1 parent 52112aa
lmr authored
Showing with 7 additions and 1 deletion.
  1. +7 −1 utils/
8 utils/
@@ -109,7 +109,10 @@ def is_needed(self, unused_install_dir):
self.installed_version = self._get_installed_version_from_module(module)'imported %s version %s.', self.module_name,
- return self.version > self.installed_version
+ if hasattr(self, 'minimum_version'):
+ return self.minimum_version > self.installed_version
+ else:
+ return self.version > self.installed_version
def _get_installed_version_from_module(self, module):
@@ -476,6 +479,9 @@ class SetuptoolsPackage(ExternalPackage):
# For all known setuptools releases a string compare works for the
# version string. Hopefully they never release a 0.10. (Their own
# version comparison code would break if they did.)
+ # Any system with setuptools > 0.6 is fine. If none installed, then
+ # try to install the latest found on the upstream.
+ minimum_version = '0.6'
version = '0.6c11'
urls = (''
'setuptools-%s.tar.gz' % (version,),)
Please sign in to comment.
Something went wrong with that request. Please try again.