Skip to content

Commit

Permalink
Merge pull request #1676 from mayeut/bump-python-pipx
Browse files Browse the repository at this point in the history
Use Python 3.12 for tools
  • Loading branch information
mayeut authored Sep 8, 2024
2 parents 49dc161 + c3437bc commit f386546
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 35 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://github.com/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
36 changes: 18 additions & 18 deletions docker/build_scripts/requirements-tools/cmake
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
# This file was autogenerated by uv via the following command:
# nox -s update_python_dependencies
cmake==3.30.2 \
--hash=sha256:02657456811a8dd95d07728e0878ee6e09d0466de84319513af99490beefe753 \
--hash=sha256:27f9f8b8a442d489cf4ae5dae1e475430979e9fcfbaef5fd0810aac4206548a9 \
--hash=sha256:33e6ce72a4865b25f7f61e40e634382a7cfbe494785ce3c0aa94475b5e0f9252 \
--hash=sha256:48e0998068d785d3b78cc60a7e3d38fd71cfb942ce0a72ee046de38ec2bd6523 \
--hash=sha256:54dba98c12c6b77bd86b452b71c7f7f3b04027081f3451e18cdf2d926e4695e5 \
--hash=sha256:6021b64ec6ddf43ff5887e510f897468a281f1822feedf48edf86926288a48a7 \
--hash=sha256:709568c04f60f6dbee846a997a774ae28e12e809b4cbb12b6cd00767c111ede0 \
--hash=sha256:806d3295c75ae4f9bd53100b4cdd17c00b41e1606a6cff6faf1f599fdace7d71 \
--hash=sha256:894214560a6d70af6e88d8506f41f6911c31757a7799eced3322ca1fc4c76e4a \
--hash=sha256:8d0b29a92cf31c54ab21040e84a78420abbf59cdd73c30d05e0e70229b2e9348 \
--hash=sha256:977acfb5256e29bc9e14004a2350a7f8bb6a2c5d42ad74183fb64275b99af2fa \
--hash=sha256:9beca135489d56a89cf54cf3d324bcf8dd6c50cc9bdb76b9a97e8540935797b2 \
--hash=sha256:b58b658f3ea47b1b6deb8fab817bf68a9c7f00fde514ad344b9cef16d684206a \
--hash=sha256:e706eded76e0e8b09d2cf09cbab0a930f6550084a85950982b7c53f6a79a0451 \
--hash=sha256:ee421b9531279b88e54c4bd3ff41c538d1f563e75b1340a8eb2569c38949d230 \
--hash=sha256:fe4f48bb96fadef92697ccaeb98b22ff36b3add80e45ce48e0c67462846fd242 \
--hash=sha256:fef0b8a18a6376ff430e86bedcccb4018b344295a17584aaebf1b7339c92f505
cmake==3.30.3 \
--hash=sha256:1616e2806c4c85e21fd0b6e92a61d41cb47479b5305bfa6f0c00baacfd029d7d \
--hash=sha256:1ca7e29f5952634274d33ec1cb0cd9ddb79cb0b09cc3887b55d24c9852eed9d0 \
--hash=sha256:30c2cdf8a863573a5fd7bf39159fbb96e75ac1955e481d35e5295ac601ea23af \
--hash=sha256:3b41b0fbf3b449dd387c71444c9eb7f23e9a8061554bbf8fd8157ee355427220 \
--hash=sha256:592cfcf280570713b8743bf8a8dec3753e0b82a7791d7d79f5ddb4f2be8b48b8 \
--hash=sha256:6e294e3f424175b085809f713dd7ee36edd36b6b8a579911ef90359d8f884658 \
--hash=sha256:81e5dc3103a4c6594d3efdf652e21e21d610e264f0c489ebefa3db04b1cdd2bc \
--hash=sha256:870ebf590fb2f7cc58c8aa5b4dc32b50d4ca9c2fb9f1e46cd0426a995a2ef71e \
--hash=sha256:8cc4c67432cca5e7a24a74eb102bc0472581a71231e58c224e544373dcb147a7 \
--hash=sha256:a5ac1157eaa1e95bd67f11bd6ebc6f85b42ce6f2aac7b93d28dd84a5230be55b \
--hash=sha256:a9e14118824992313bd0e2b3b86d9c85d7883c39b784199ea755fc32aeeb9e81 \
--hash=sha256:ba26cb3c19f5b4cb83787394647a5dafbd2922a6de4af39409d7d287536a617f \
--hash=sha256:c015d02e5f25973b66b66a060d3ad8c1c382cf38ba7b09712770d9de50b67b80 \
--hash=sha256:c98cf8980ed75dd15be9948da559a51ce4cd0f017fc44969a72dcd37f507fa61 \
--hash=sha256:ca990748d1a1d778a1a31cc1e33dcb01f2ed6fb0a752e945ff9e2d5435cff191 \
--hash=sha256:e0fd7746f8895ec54e20c5d5dcc76a42256483e1f4736050264a180a13f9f8ef \
--hash=sha256:fc5fba153bd0255adb246f27358d98db597a62264b61970d32038f9c7f355a70
# via -r .nox/update_python_dependencies/tmp/cmake.in
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 f386546

Please sign in to comment.