# --- T2-COPYRIGHT-BEGIN --- # t2/package/*/firefox/hotfix-no-pip-check.patch # Copyright (C) 2025 - 2026 The T2 SDE Project # SPDX-License-Identifier: GPL-2.0 or patched project license # --- T2-COPYRIGHT-END --- Disable pip checks as mach is broken for python 3.12 and up. It checks versions of unrelated packages. We already provide python packages at system level anyway so the overhead of extra checks is not needed. --- firefox-148.0/python/mach/mach/site.py.vanilla 2026-02-23 21:52:00.234161217 +0100 +++ firefox-148.0/python/mach/mach/site.py 2026-02-23 21:52:15.720927122 +0100 @@ -1413,40 +1413,6 @@ ) as f: f.write("\n".join(pthfile_lines)) - pip = pip_command(python_executable=check_env.python_path) - if requirements: - packages = _resolve_installed_packages(check_env.python_path) - validation_result = RequirementsValidationResult.from_packages( - packages, requirements - ) - if not validation_result.has_all_packages: - subprocess.check_call(pip + ["list", "-v"], stdout=sys.stderr) - print(validation_result.report(), file=sys.stderr) - raise Exception( - f'The "{virtualenv_name}" site is not compatible with the installed ' - "system Python packages." - ) - - check_result = subprocess.run( - pip + ["check"], - check=False, - stdout=subprocess.PIPE, - stderr=subprocess.STDOUT, - text=True, - ) - if check_result.returncode: - subprocess.check_call(pip + ["list", "-v"], stdout=sys.stderr) - print(check_result.stdout, file=sys.stderr) - raise Exception( - 'According to "pip check", the current Python ' - "environment has package-compatibility issues." - ) - - os.environ[ - f"MACH_SYSTEM_ASSERTED_COMPATIBLE_WITH_{virtualenv_name.upper()}_SITE" - ] = "1" - - def _deprioritize_venv_packages(virtualenv, populate_virtualenv): # Virtualenvs implicitly add some "site packages" to the sys.path upon being # activated. However, Mach generally wants to prioritize the existing sys.path