# --- T2-COPYRIGHT-NOTE-BEGIN --- # T2 SDE: package/*/thunderbird/hotfix-no-pip-check.patch # Copyright (C) 2024 The T2 SDE Project # # This Copyright note is generated by scripts/Create-CopyPatch, # more information can be found in the files COPYING and README. # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms # of the GNU General Public License version 2 as used by the T2 SDE. # --- T2-COPYRIGHT-NOTE-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. - NoTag --- firefox-130.0.1/python/mach/mach/site.py.vanilla 2024-09-17 17:44:02.205297850 +0200 +++ firefox-130.0.1/python/mach/mach/site.py 2024-09-17 17:55:24.758627113 +0200 @@ -1200,18 +1200,18 @@ f.write("\n".join(pthfile_lines)) pip = [check_env.python_path, "-m", "pip"] - 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." - ) + # 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"], @@ -1219,13 +1219,13 @@ stderr=subprocess.STDOUT, universal_newlines=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." - ) + # 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"