Skip to content

Commit cdbcdca

Browse files
timarmstrongImpala Public Jenkins
authored and
Impala Public Jenkins
committed
IMPALA-4570: shell tarball breaks with certain setuptools versions
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 <[email protected]> Tested-by: Impala Public Jenkins
1 parent d484d2f commit cdbcdca

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

shell/pkg_resources.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -2292,7 +2292,7 @@ def insert_on(self, path, loc = None):
22922292
version = self.version
22932293
except ValueError:
22942294
version = ''
2295-
if '0.7' in version:
2295+
if version.startswith('0.7'):
22962296
raise ValueError(
22972297
"A 0.7-series setuptools cannot be installed "
22982298
"with distribute. Found one at %s" % str(self.location))
@@ -2593,7 +2593,7 @@ def _override_setuptools(req):
25932593
return True
25942594
for comparator, version in req.specs:
25952595
if comparator in ['==', '>=', '>']:
2596-
if '0.7' in version:
2596+
if version.startswith('0.7'):
25972597
# We want some setuptools not from the 0.6 series.
25982598
return False
25992599
return True

0 commit comments

Comments
 (0)