Bug 1843209 - Bump Mach's minimum Python version to `3.8` r=firefox-build-system-reviewers,glandium

Differential Revision: https://phabricator.services.mozilla.com/D183449
This commit is contained in:
ahochheiden 2023-12-12 03:52:00 +00:00
Родитель 5f5cd425b6
Коммит 94030d06be
8 изменённых файлов: 22 добавлений и 38 удалений

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

@ -11,7 +11,7 @@ related to the build system, Python is typically the first choice.
Python Requirements
===================
The tree requires Python 3.7 or greater to build.
The tree requires Python 3.8 or greater to build.
All Python packages not in the Python distribution are included in the
source tree. So all you should need is a vanilla Python install and you
should be good to go.

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

@ -20,7 +20,7 @@ they are running in the JS shell environment.
* REQUIREMENTS
Python 3.7. This is already a standard requirement for building our tree.
Python 3.8. This is already a standard requirement for building our tree.
* RUNNING THE TESTS

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

@ -10,7 +10,7 @@ import subprocess
import traceback
from textwrap import dedent, fill
MIN_PYTHON_VERSION = (3, 7)
MIN_PYTHON_VERSION = (3, 8)
MAX_PYTHON_VERSION_TO_CONSIDER = (3, 11)
@ -80,7 +80,7 @@ def try_alternate_python3_executables(args):
def main(args):
# Ensure we are running Python 3.7+. We run this check as soon as
# Ensure we are running Python 3.8+. We run this check as soon as
# possible to avoid a cryptic import/usage error.
if sys.version_info < MIN_PYTHON_VERSION:
print(

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

@ -14,10 +14,10 @@
import sys
major, minor = sys.version_info[:2]
if (major < 3) or (major == 3 and minor < 7):
if (major < 3) or (major == 3 and minor < 8):
print(
"Bootstrap currently only runs on Python 3.7+."
"Please try re-running with python3.7+."
"Bootstrap currently only runs on Python 3.8+."
"Please try re-running with python3.8+."
)
sys.exit(1)

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

@ -12,11 +12,6 @@ transforms:
- gecko_taskgraph.transforms.task:transforms
jobs:
debian10:
image: debian:buster
pre-commands:
- apt-get update
- apt-get install -y --no-install-recommends curl mercurial python3-pip
debian11:
image: debian:bullseye
pre-commands:

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

@ -38,8 +38,8 @@ ub18-python-psutil:
sha256: a0ca4560d25fcfe5b7407d2cb21318f0635f2c3559898efce1679eef35b61f05
name: python-psutil
pre-build-command: >-
apt-get install python3.7-dev python3.7-dbg &&
export DEBPYTHON3_SUPPORTED="3.7"
apt-get install python3.8-dev python3.8-dbg &&
export DEBPYTHON3_SUPPORTED="3.8"
ub18-pygobject:
description: "pygobject for Ubuntu bionic"
@ -51,8 +51,8 @@ ub18-pygobject:
sha256: b77f84885d9b6d2c03422ecb3bf69d50dd0607d3456154943671e5a1f87946aa
name: pygobject
pre-build-command: >-
apt-get install python3.7-dev python3.7-dbg &&
export DEBPYTHON3_SUPPORTED="3.6,3.7"
apt-get install python3.8-dev python3.8-dbg &&
export DEBPYTHON3_SUPPORTED="3.6,3.8"
ub18-pyatspi:
description: "pyatspi for Ubuntu bionic"
@ -66,8 +66,8 @@ ub18-pyatspi:
pre-build-command: >-
sed -i s/\\basync\\b/asynchronous/ pyatspi/registry.py &&
EDITOR=cat dpkg-source --commit . sync &&
apt-get install python3.7-dev python3.7-dbg &&
export DEBPYTHON3_SUPPORTED="3.6,3.7"
apt-get install python3.8-dev python3.8-dbg &&
export DEBPYTHON3_SUPPORTED="3.6,3.8"
ub18-python-zstandard:
description: "python-zstandard for Ubuntu bionic"
@ -79,8 +79,8 @@ ub18-python-zstandard:
sha256: 31d12fcd942dd8dbf52ca5f6b1bbe287f44e5d551a081a983ff3ea2082867863
name: python-zstandard
pre-build-command: >-
apt-get install python3.7-dev &&
export DEBPYTHON3_SUPPORTED="3.7" &&
apt-get install python3.8-dev &&
export DEBPYTHON3_SUPPORTED="3.8" &&
debchange -v 0.19.0-1.ub18moz --distribution bionic "Mozilla backport for bionic"
ub18-mercurial:
@ -92,9 +92,9 @@ ub18-mercurial:
url: https://www.mercurial-scm.org/release/mercurial-6.4.3.tar.gz
sha256: a77fb62d325934a83a00b2fc6db109f44c67b86768fc40490366f513640c7f64
pre-build-command: >-
apt-get install python3.7-dev &&
export DEB_HG_PYTHON_VERSIONS="3.7" &&
export DEBPYTHON3_SUPPORTED="3.7" &&
apt-get install python3.8-dev &&
export DEB_HG_PYTHON_VERSIONS="3.8" &&
export DEBPYTHON3_SUPPORTED="3.8" &&
cp -r contrib/packaging/debian debian &&
sed -i -e "s/__VERSION__/$(awk -F\" '$2 {print $2}' mercurial/__version__.py)-1.ub18moz1/" \
-e "s/__DATE__/$(date --rfc-2822)/" \

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

@ -12,17 +12,6 @@ job-defaults:
run:
script: build-cpython.sh
linux64-python-3.7:
treeherder:
symbol: TL(python3.7)
run:
toolchain-artifact: public/build/python.tar.zst
fetches:
fetch:
- cpython-3.7.15
worker:
docker-image: {in-tree: ubuntu1804-build-python}
linux64-python-3.8:
treeherder:
symbol: TL(python)

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

@ -37,9 +37,9 @@ RUN /usr/local/sbin/setup_packages.sh $TASKCLUSTER_ROOT_URL $DOCKER_IMAGE_PACKAG
make \
mercurial \
patch \
python3.7 \
python3.7-dev \
python3.7-venv \
python3.8 \
python3.8-dev \
python3.8-venv \
python3-distutils-extra \
python3-minimal \
python3-zstandard \
@ -50,7 +50,7 @@ RUN /usr/local/sbin/setup_packages.sh $TASKCLUSTER_ROOT_URL $DOCKER_IMAGE_PACKAG
zstd \
&& /usr/local/sbin/clean_packages.sh $DOCKER_IMAGE_PACKAGES
RUN test $(readlink /usr/bin/python3) = python3.6 && ln -sf python3.7 /usr/bin/python3
RUN test $(readlink /usr/bin/python3) = python3.6 && ln -sf python3.8 /usr/bin/python3
# %include testing/mozharness/external_tools/robustcheckout.py
COPY topsrcdir/testing/mozharness/external_tools/robustcheckout.py /usr/local/mercurial/robustcheckout.py