Skip to content

Commit

Permalink
IMPALA-4570: shell tarball breaks with certain setuptools versions
Browse files Browse the repository at this point in the history
The bug was in the third-party pkg_resources.py script. The version
check was broken because it matches any version with a "0.7" substring
instead of just versions starting with 0.7.

This is a known bug. setuptools even re-released 20.7.0 as version
20.8.0 to avoid it:
pypa/setuptools@e5822f0

Testing:
I was unable to reproduce this locally, but I think the fix is clear-cut
enough that this is ok.

Change-Id: I0565c0e6c1be7d82c3f35d2545ba044a684bb075
Reviewed-on: http://gerrit.cloudera.org:8080/5314
Reviewed-by: Tim Armstrong <tarmstrong@cloudera.com>
Tested-by: Impala Public Jenkins
  • Loading branch information
Tim Armstrong authored and jenkins committed Dec 3, 2016
1 parent 3e61a36 commit b306be8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions shell/pkg_resources.py
Expand Up @@ -2292,7 +2292,7 @@ def insert_on(self, path, loc = None):
version = self.version
except ValueError:
version = ''
if '0.7' in version:
if version.startswith('0.7'):
raise ValueError(
"A 0.7-series setuptools cannot be installed "
"with distribute. Found one at %s" % str(self.location))
Expand Down Expand Up @@ -2593,7 +2593,7 @@ def _override_setuptools(req):
return True
for comparator, version in req.specs:
if comparator in ['==', '>=', '>']:
if '0.7' in version:
if version.startswith('0.7'):
# We want some setuptools not from the 0.6 series.
return False
return True
Expand Down

0 comments on commit b306be8

Please sign in to comment.