Bug 1626098 - mach bootstrap - Only install python-pip on Ubuntu < 20.04 and Debian != "bullseye" r=firefox-build-system-reviewers,rstewart

Differential Revision: https://phabricator.services.mozilla.com/D68900

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Sylvestre Ledru 2020-04-07 16:40:49 +00:00
parent 67aa2dee05
commit 0fcd204f92
2 changed files with 11 additions and 2 deletions

View File

@ -257,6 +257,7 @@ class Bootstrapper(object):
elif dist_id in DEBIAN_DISTROS:
cls = DebianBootstrapper
args['distro'] = dist_id
args['codename'] = codename
elif dist_id in ('gentoo', 'funtoo'):
cls = GentooBootstrapper
elif dist_id in ('solus'):

View File

@ -51,7 +51,6 @@ class DebianBootstrapper(
'autoconf2.13',
'build-essential',
'nodejs',
'python-pip',
'python-setuptools',
'unzip',
'uuid',
@ -97,12 +96,13 @@ class DebianBootstrapper(
# Subclasses can add packages to this variable to have them installed.
MOBILE_ANDROID_DISTRO_PACKAGES = []
def __init__(self, distro, version, dist_id, **kwargs):
def __init__(self, distro, version, dist_id, codename, **kwargs):
BaseBootstrapper.__init__(self, **kwargs)
self.distro = distro
self.version = version
self.dist_id = dist_id
self.codename = codename
self.packages = self.COMMON_PACKAGES + self.DISTRO_PACKAGES
if self.distro == 'debian':
@ -112,6 +112,14 @@ class DebianBootstrapper(
if self.distro == 'ubuntu' and int(self.version.split('.')[0]) >= 20:
self.packages.extend(['python2.7', 'python2.7-dev'])
else:
if (self.distro == 'ubuntu'
or (self.distro == 'debian' and self.codename != "bullseye")):
# On old Ubuntu and Debian before bullseye (11), it was called this way
# Note that we don't use Debian version code as the Python API doesn't provide
# it yet
# TODO: Update once bullseye is released in 2021
self.packages.append('python-pip')
self.packages.append('python-dev')
self.browser_packages = self.BROWSER_COMMON_PACKAGES + self.BROWSER_DISTRO_PACKAGES
self.mobile_android_packages = self.MOBILE_ANDROID_COMMON_PACKAGES + \