Bug 1680162: Install python packages after system packages r=firefox-build-system-reviewers,glandium

Native python packages will probably require python headers. For some
systems, these are available in a separate system package (such as
python[3]-dev).

If the user is bootstrapping with "--no-system-changes", we just
try to install these native packages and fail gracefully if required
headers aren't installed.

Differential Revision: https://phabricator.services.mozilla.com/D98530
This commit is contained in:
Mitchell Hentges 2020-12-08 15:35:05 +00:00
Родитель 33446223da
Коммит 16222ee4ed
2 изменённых файлов: 6 добавлений и 2 удалений

Просмотреть файл

@ -175,7 +175,7 @@ class BaseBootstrapper(object):
def suggest_install_distutils(self):
"""Called if distutils.{sysconfig,spawn} can't be imported."""
print(
"Does your distro require installing another package for " "distutils?",
"Does your distro require installing another package for distutils?",
file=sys.stderr,
)

Просмотреть файл

@ -404,15 +404,19 @@ class Bootstrapper(object):
)
self.instance.validate_environment(checkout_root)
self._validate_python_environment()
self.instance.ensure_mach_environment(checkout_root)
if self.instance.no_system_changes:
self.instance.ensure_mach_environment(checkout_root)
self.check_telemetry_opt_in(state_dir)
self.maybe_install_private_packages_or_exit(state_dir, checkout_root)
self._output_mozconfig(application, mozconfig_builder)
sys.exit(0)
self.instance.install_system_packages()
# Install mach environment python packages after system packages.
# Some mach packages require building native modules, which require
# tools which are installed to the system.
self.instance.ensure_mach_environment(checkout_root)
# Like 'install_browser_packages' or 'install_mobile_android_packages'.
getattr(self.instance, "install_%s_packages" % application)(mozconfig_builder)