Bug 1622963 - Require python 3.6 for the build system. r=firefox-build-system-reviewers,rstewart

Differential Revision: https://phabricator.services.mozilla.com/D77754
This commit is contained in:
Mike Hommey 2020-06-09 21:22:32 +00:00
parent efb66eaac8
commit 70653120cb
3 changed files with 8 additions and 8 deletions

View File

@ -237,7 +237,7 @@ shell = help_shell | shell
# Python 3 # Python 3
# ======== # ========
option(env='PYTHON3', nargs=1, help='Python 3 interpreter (3.5 or later)') option(env='PYTHON3', nargs=1, help='Python 3 interpreter (3.6 or later)')
@depends('PYTHON3', check_build_environment, mozconfig, '--help') @depends('PYTHON3', check_build_environment, mozconfig, '--help')
@ -334,20 +334,20 @@ def virtualenv_python3(env_python, build_env, mozconfig, help):
'(%s): %s' % (python, e)) '(%s): %s' % (python, e))
else: else:
# Fall back to the search routine. # Fall back to the search routine.
python, version = find_python3_executable(min_version='3.5.0') python, version = find_python3_executable(min_version='3.6.0')
# The API returns a bytes whereas everything in configure is unicode. # The API returns a bytes whereas everything in configure is unicode.
if python: if python:
python = ensure_text(python) python = ensure_text(python)
if not python: if not python:
raise FatalCheckError('Python 3.5 or newer is required to build. ' raise FatalCheckError('Python 3.6 or newer is required to build. '
'Ensure a `python3.x` executable is in your ' 'Ensure a `python3.x` executable is in your '
'PATH or define PYTHON3 to point to a Python ' 'PATH or define PYTHON3 to point to a Python '
'3.5 executable.') '3.6 executable.')
if version < (3, 5, 0): if version < (3, 6, 0):
raise FatalCheckError('Python 3.5 or newer is required to build; ' raise FatalCheckError('Python 3.6 or newer is required to build; '
'%s is Python %d.%d' % (python, version[0], '%s is Python %d.%d' % (python, version[0],
version[1])) version[1]))

View File

@ -45,7 +45,7 @@ def python_executable_version(exe):
def _find_python_executable(major): def _find_python_executable(major):
if major not in (2, 3): if major not in (2, 3):
raise ValueError('Expected a Python major version of 2 or 3') raise ValueError('Expected a Python major version of 2 or 3')
min_versions = {2: '2.7.0', 3: '3.5.0'} min_versions = {2: '2.7.0', 3: '3.6.0'}
def ret(min_version=min_versions[major]): def ret(min_version=min_versions[major]):
from mozfile import which from mozfile import which

View File

@ -687,7 +687,7 @@ def verify_python_version(log_handle):
major, minor, micro = sys.version_info[:3] major, minor, micro = sys.version_info[:3]
minimum_python_versions = { minimum_python_versions = {
2: LooseVersion('2.7.3'), 2: LooseVersion('2.7.3'),
3: LooseVersion('3.5.0'), 3: LooseVersion('3.6.0'),
} }
our = LooseVersion('%d.%d.%d' % (major, minor, micro)) our = LooseVersion('%d.%d.%d' % (major, minor, micro))