Bug 1542376 - Avoid exception during Android bootstrap. r=glandium

Mozboot uses Python 2.7.3, along with the |unicode_literals| directive,
which makes string literals unicode by default. However, the
LooseVersion implementation that ships with Python throws an exception
when comparing against bare unicode strings, because it only checks for
StringType, not UnicodeType [1].

[1] https://github.com/enthought/Python-2.7.3/blob/master/Lib/distutils/version.py#L292

Differential Revision: https://phabricator.services.mozilla.com/D26378
This commit is contained in:
Bobby Holley
2019-04-05 22:07:30 +00:00
parent 1666e92b07
commit 0c3936d502

View File

@@ -708,7 +708,7 @@ class BaseBootstrapper(object):
if 'mobile_android' in self.application:
# Let's add the most common targets.
if rust_version < '1.33':
if rust_version < LooseVersion('1.33'):
arm_target = 'armv7-linux-androideabi'
else:
arm_target = 'thumbv7neon-linux-androideabi'