Skip to content

Commit

Permalink
Use Python 3.12 for tools
Browse files Browse the repository at this point in the history
  • Loading branch information
mayeut committed Sep 8, 2024
1 parent 49dc161 commit 85dcb0c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 17 deletions.
12 changes: 6 additions & 6 deletions docker/build_scripts/finalize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,18 @@ cat <<EOF > /usr/local/bin/manylinux-interpreters
set -euo pipefail
/opt/python/cp310-cp310/bin/python $MY_DIR/manylinux-interpreters.py "\$@"
/opt/python/cp312-cp312/bin/python $MY_DIR/manylinux-interpreters.py "\$@"
EOF
chmod 755 /usr/local/bin/manylinux-interpreters

MANYLINUX_INTERPRETERS_NO_CHECK=1 /usr/local/bin/manylinux-interpreters ensure "$@"

# Create venv for auditwheel & certifi
# Create venv for certifi and pipx
TOOLS_PATH=/opt/_internal/tools
/opt/python/cp310-cp310/bin/python -m venv --without-pip ${TOOLS_PATH}
/opt/python/cp312-cp312/bin/python -m venv --without-pip ${TOOLS_PATH}

# Install certifi and pipx
/opt/python/cp310-cp310/bin/python -m pip --python ${TOOLS_PATH}/bin/python install -U --require-hashes -r ${MY_DIR}/requirements-base-tools.txt
/opt/python/cp312-cp312/bin/python -m pip --python ${TOOLS_PATH}/bin/python install -U --require-hashes -r ${MY_DIR}/requirements-base-tools.txt

# Make pipx available in PATH,
# Make sure when root installs apps, they're also in the PATH
Expand Down Expand Up @@ -74,7 +74,7 @@ export SSL_CERT_FILE=/opt/_internal/certs.pem

# initialize shared library
# workaround https:/pypa/pip/issues/9243
/opt/python/cp310-cp310/bin/python -m pip download --dest /tmp/pinned-wheels --require-hashes -r /opt/_internal/build_scripts/requirements3.10.txt
/opt/python/cp312-cp312/bin/python -m pip download --dest /tmp/pinned-wheels --require-hashes -r /opt/_internal/build_scripts/requirements3.12.txt
pipx upgrade-shared --pip-args="--no-index --find-links=/tmp/pinned-wheels"

# install other tools with pipx
Expand All @@ -92,7 +92,7 @@ clean_pyc /opt/_internal
# remove cache
rm -rf /tmp/* || true

hardlink -cv /opt/_internal
hardlink -c /opt/_internal

# update system packages
LC_ALL=C ${MY_DIR}/update-system-packages.sh
10 changes: 3 additions & 7 deletions docker/build_scripts/requirements-base-tools.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,9 @@ pipx==1.7.1 \
--hash=sha256:3933c43bb344e649cb28e10d357e0967ce8572f1c19caf90cf39ae95c2a0afaf \
--hash=sha256:762de134e16a462be92645166d225ecef446afaef534917f5f70008d63584360
# via -r requirements-base-tools.in
platformdirs==4.2.2 \
--hash=sha256:2d7a1657e36a80ea911db832a8a6ece5ee53d8de21edd5cc5879af6530b1bfee \
--hash=sha256:38b7b51f512eed9e84a22788b4bce1de17c0adb134d6becb09836e37d8654cd3
# via pipx
tomli==2.0.1 \
--hash=sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc \
--hash=sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f
platformdirs==4.3.2 \
--hash=sha256:9e5e27a08aa095dd127b9f2e764d74254f482fef22b0970773bfba79d091ab8c \
--hash=sha256:eb1c8582560b34ed4ba105009a4badf7f6f85768b30126f351328507b2beb617
# via pipx
userpath==1.9.2 \
--hash=sha256:2cbf01a23d655a1ff8fc166dfb78da1b641d1ceabf0fe5f970767d380b14e89d \
Expand Down
7 changes: 3 additions & 4 deletions noxfile.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import os
import re
from pathlib import Path

import nox
Expand Down Expand Up @@ -34,7 +33,7 @@ def update_python_dependencies(session):
)

# tools
python_version = "3.10"
python_version = "3.12"
session.run(
"uv", "pip", "compile",
f"--python-version={python_version}",
Expand Down Expand Up @@ -63,7 +62,7 @@ def update_python_dependencies(session):
)


@nox.session(python="3.11", reuse_venv=True)
@nox.session(python="3.12", reuse_venv=True)
def update_native_dependencies(session):
"Update the native dependencies"
script = "tools/update_native_dependencies.py"
Expand All @@ -72,7 +71,7 @@ def update_native_dependencies(session):
session.run("python", script, *session.posargs)


@nox.session(python="3.11", reuse_venv=True)
@nox.session(python="3.12", reuse_venv=True)
def update_interpreters_download(session):
"Update all the Python interpreters"
script = "tools/update_interpreters_download.py"
Expand Down

0 comments on commit 85dcb0c

Please sign in to comment.