mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
Bug 1623544 - Install python3-pip on Debian during bootstrap; r=firefox-build-system-reviewers,rstewart
Differential Revision: https://phabricator.services.mozilla.com/D68160 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
ff6f9dd6a8
commit
8559ac6776
@ -124,14 +124,15 @@ class DebianBootstrapper(
|
||||
|
||||
have_python3 = any([self.which('python3'), self.which('python3.6'),
|
||||
self.which('python3.5')])
|
||||
python3_packages = self.check_output(
|
||||
['apt-cache', 'pkgnames', 'python3'], universal_newlines=True)
|
||||
python3_packages = python3_packages.splitlines()
|
||||
|
||||
if not have_python3:
|
||||
python3_packages = self.check_output(
|
||||
['apt-cache', 'pkgnames', 'python3'], universal_newlines=True)
|
||||
python3_packages = python3_packages.splitlines()
|
||||
if not have_python3 and 'python3' in python3_packages:
|
||||
packages.extend(['python3', 'python3-dev'])
|
||||
|
||||
if 'python3' in python3_packages:
|
||||
packages.extend(['python3', 'python3-dev'])
|
||||
if not self.which('pip3') and 'python3-pip' in python3_packages:
|
||||
packages.append('python3-pip')
|
||||
|
||||
self.apt_install(*packages)
|
||||
|
||||
|
@ -37,6 +37,19 @@ class PhabricatorCommandProvider(MachCommandBase):
|
||||
)
|
||||
sys.exit(1)
|
||||
|
||||
# pip3 is part of Python since 3.4, however some distros choose to
|
||||
# remove core components from languages. While bootstrap should
|
||||
# install pip3 it isn't always possible, so display a nicer error
|
||||
# message if pip3 is missing.
|
||||
if not shutil.which("pip3"):
|
||||
self.log(
|
||||
logging.ERROR,
|
||||
"pip3_not_installed",
|
||||
{},
|
||||
"`pip3` is not installed. Try running `mach bootstrap`.",
|
||||
)
|
||||
sys.exit(1)
|
||||
|
||||
command = ["pip3", "install", "--upgrade", "MozPhab"]
|
||||
|
||||
if (
|
||||
|
Loading…
Reference in New Issue
Block a user