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
parent 5f5cd425b6
commit 94030d06be
8 changed files with 22 additions and 38 deletions

View file

@ -11,7 +11,7 @@ related to the build system, Python is typically the first choice.
Python Requirements 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 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 source tree. So all you should need is a vanilla Python install and you
should be good to go. should be good to go.

View file

@ -20,7 +20,7 @@ they are running in the JS shell environment.
* REQUIREMENTS * 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 * RUNNING THE TESTS

4
mach
View file

@ -10,7 +10,7 @@ import subprocess
import traceback import traceback
from textwrap import dedent, fill from textwrap import dedent, fill
MIN_PYTHON_VERSION = (3, 7) MIN_PYTHON_VERSION = (3, 8)
MAX_PYTHON_VERSION_TO_CONSIDER = (3, 11) MAX_PYTHON_VERSION_TO_CONSIDER = (3, 11)
@ -80,7 +80,7 @@ def try_alternate_python3_executables(args):
def main(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. # possible to avoid a cryptic import/usage error.
if sys.version_info < MIN_PYTHON_VERSION: if sys.version_info < MIN_PYTHON_VERSION:
print( print(

View file

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

View file

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

View file

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

View file

@ -12,17 +12,6 @@ job-defaults:
run: run:
script: build-cpython.sh 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: linux64-python-3.8:
treeherder: treeherder:
symbol: TL(python) symbol: TL(python)

View file

@ -37,9 +37,9 @@ RUN /usr/local/sbin/setup_packages.sh $TASKCLUSTER_ROOT_URL $DOCKER_IMAGE_PACKAG
make \ make \
mercurial \ mercurial \
patch \ patch \
python3.7 \ python3.8 \
python3.7-dev \ python3.8-dev \
python3.7-venv \ python3.8-venv \
python3-distutils-extra \ python3-distutils-extra \
python3-minimal \ python3-minimal \
python3-zstandard \ python3-zstandard \
@ -50,7 +50,7 @@ RUN /usr/local/sbin/setup_packages.sh $TASKCLUSTER_ROOT_URL $DOCKER_IMAGE_PACKAG
zstd \ zstd \
&& /usr/local/sbin/clean_packages.sh $DOCKER_IMAGE_PACKAGES && /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 # %include testing/mozharness/external_tools/robustcheckout.py
COPY topsrcdir/testing/mozharness/external_tools/robustcheckout.py /usr/local/mercurial/robustcheckout.py COPY topsrcdir/testing/mozharness/external_tools/robustcheckout.py /usr/local/mercurial/robustcheckout.py