2020-07-31 12:11:59 +02:00
|
|
|
# Revert 6700a8dfaeb1e303955acc05dabd245b9ae3c97e
|
|
|
|
|
|
|
|
Bug 1622963 - Require python 3.6 for the build system. r=firefox-build-system-reviewers,rstewart
|
|
|
|
|
|
|
|
Differential Revision: https://phabricator.services.mozilla.com/D77754
|
|
|
|
|
2020-12-20 20:49:13 +01:00
|
|
|
diff -r 81f3a9d8e5f4 build/moz.configure/init.configure
|
|
|
|
--- a/build/moz.configure/init.configure Tue Nov 17 21:27:44 2020 +0000
|
|
|
|
+++ b/build/moz.configure/init.configure Wed Nov 18 08:22:17 2020 +0100
|
|
|
|
@@ -216,7 +216,7 @@
|
2020-07-31 12:11:59 +02:00
|
|
|
# Python 3
|
|
|
|
# ========
|
|
|
|
|
2020-12-20 20:49:13 +01:00
|
|
|
-option(env="PYTHON3", nargs=1, help="Python 3 interpreter (3.6 or later)")
|
|
|
|
+option(env="PYTHON3", nargs=1, help="Python 3 interpreter (3.5 or later)")
|
2020-07-31 12:11:59 +02:00
|
|
|
|
2020-12-20 20:49:13 +01:00
|
|
|
option(
|
|
|
|
env="VIRTUALENV_NAME",
|
|
|
|
@@ -327,7 +327,7 @@
|
|
|
|
)
|
2020-07-31 12:11:59 +02:00
|
|
|
else:
|
|
|
|
# Fall back to the search routine.
|
2020-12-20 20:49:13 +01:00
|
|
|
- python, version = find_python3_executable(min_version="3.6.0")
|
|
|
|
+ python, version = find_python3_executable(min_version="3.5.0")
|
2020-07-31 12:11:59 +02:00
|
|
|
|
|
|
|
# The API returns a bytes whereas everything in configure is unicode.
|
|
|
|
if python:
|
2020-12-20 20:49:13 +01:00
|
|
|
@@ -335,15 +335,15 @@
|
2020-07-31 12:11:59 +02:00
|
|
|
|
|
|
|
if not python:
|
2020-12-20 20:49:13 +01:00
|
|
|
raise FatalCheckError(
|
|
|
|
- "Python 3.6 or newer is required to build. "
|
|
|
|
+ "Python 3.5 or newer is required to build. "
|
|
|
|
"Ensure a `python3.x` executable is in your "
|
|
|
|
"PATH or define PYTHON3 to point to a Python "
|
|
|
|
- "3.6 executable."
|
|
|
|
+ "3.5 executable."
|
|
|
|
)
|
2020-07-31 12:11:59 +02:00
|
|
|
|
|
|
|
- if version < (3, 6, 0):
|
|
|
|
+ if version < (3, 5, 0):
|
2020-12-20 20:49:13 +01:00
|
|
|
raise FatalCheckError(
|
|
|
|
- "Python 3.6 or newer is required to build; "
|
|
|
|
+ "Python 3.5 or newer is required to build; "
|
|
|
|
"%s is Python %d.%d" % (python, version[0], version[1])
|
|
|
|
)
|
2020-07-31 12:11:59 +02:00
|
|
|
|
2020-12-20 20:49:13 +01:00
|
|
|
diff -r 81f3a9d8e5f4 python/mozbuild/mozbuild/pythonutil.py
|
|
|
|
--- a/python/mozbuild/mozbuild/pythonutil.py Tue Nov 17 21:27:44 2020 +0000
|
|
|
|
+++ b/python/mozbuild/mozbuild/pythonutil.py Wed Nov 18 08:22:17 2020 +0100
|
|
|
|
@@ -44,7 +44,7 @@
|
2020-07-31 12:11:59 +02:00
|
|
|
def _find_python_executable(major):
|
|
|
|
if major not in (2, 3):
|
2020-12-20 20:49:13 +01:00
|
|
|
raise ValueError("Expected a Python major version of 2 or 3")
|
|
|
|
- min_versions = {2: "2.7.0", 3: "3.6.0"}
|
|
|
|
+ min_versions = {2: "2.7.0", 3: "3.5.0"}
|
2020-07-31 12:11:59 +02:00
|
|
|
|
|
|
|
def ret(min_version=min_versions[major]):
|
|
|
|
from mozfile import which
|
2020-12-20 20:49:13 +01:00
|
|
|
diff -r 81f3a9d8e5f4 python/mozbuild/mozbuild/virtualenv.py
|
|
|
|
--- a/python/mozbuild/mozbuild/virtualenv.py Tue Nov 17 21:27:44 2020 +0000
|
|
|
|
+++ b/python/mozbuild/mozbuild/virtualenv.py Wed Nov 18 08:22:17 2020 +0100
|
|
|
|
@@ -691,7 +691,7 @@
|
2020-07-31 12:11:59 +02:00
|
|
|
major, minor, micro = sys.version_info[:3]
|
|
|
|
minimum_python_versions = {
|
2020-12-20 20:49:13 +01:00
|
|
|
2: LooseVersion("2.7.3"),
|
|
|
|
- 3: LooseVersion("3.6.0"),
|
|
|
|
+ 3: LooseVersion("3.5.0"),
|
2020-07-31 12:11:59 +02:00
|
|
|
}
|
2020-12-20 20:49:13 +01:00
|
|
|
our = LooseVersion("%d.%d.%d" % (major, minor, micro))
|
2020-07-31 12:11:59 +02:00
|
|
|
|