diff --git a/.github/workflows/update-dependencies.yml b/.github/workflows/update-dependencies.yml index 7814fe46..3538afd4 100644 --- a/.github/workflows/update-dependencies.yml +++ b/.github/workflows/update-dependencies.yml @@ -8,6 +8,9 @@ on: schedule: - cron: '0 18 * * 0' # "At 18:00 on Sunday." +env: + FORCE_COLOR: '1' + jobs: update-dependencies: name: Update dependencies @@ -17,6 +20,8 @@ jobs: - uses: wntrblm/nox@2024.04.15 with: python-versions: "3.12" + - name: "Install uv" + run: pipx install uv - name: "Setup bot user" run: | git config --global user.name "manylinux-bot[bot]" @@ -30,13 +35,13 @@ jobs: app_id: ${{ secrets.MANYLINUX_BOT_APP_ID }} private_key: ${{ secrets.MANYLINUX_BOT_APP_PRIVATE_KEY }} - name: "Run update native dependencies" - run: nox --force-color --error-on-missing-interpreters -s update_native_dependencies + run: nox -s update_native_dependencies env: GITHUB_API_TOKEN: ${{ steps.generate-token.outputs.token || github.token }} - name: "Run update downloaded interpreters" - run: nox --force-color --error-on-missing-interpreters -s update_interpreters_download + run: nox -s update_interpreters_download - name: "Run update python dependencies" - run: nox --force-color --error-on-missing-interpreters -s update_python_dependencies + run: nox -s update_python_dependencies - name: Create Pull Request if: github.ref == 'refs/heads/main' && github.repository == 'pypa/manylinux' uses: peter-evans/create-pull-request@v5 diff --git a/README.rst b/README.rst index 84e81456..1b98df98 100644 --- a/README.rst +++ b/README.rst @@ -210,7 +210,18 @@ All images currently contain: - Development packages for all the libraries that PEP 571/599 list. One should not assume the presence of any other development package. -- The `auditwheel `_ tool +- The following development tools, installed via `pipx `_ (which is also available): + - `auditwheel `_ + - `cmake `_ + - `patchelf `_ + - `swig `_ + - `uv `_ (not available on ``musllinux s390x`` and ``muslllinux powerpc64le`` yet due to Rust limitations) + +- All Python interpreters have the following packages pre-installed: + - `pip `_ + - `build `_ + - `packaging `_ + - Before Python 3.12, `setuptools `_ and `wheel `_ are also available. (Currently 3.12 too, but will be removed after 3.13 is released.) - The manylinux-interpreters tool which allows to list all available interpreters & install ones missing from the image diff --git a/docker/build_scripts/finalize.sh b/docker/build_scripts/finalize.sh index df050989..122b189d 100755 --- a/docker/build_scripts/finalize.sh +++ b/docker/build_scripts/finalize.sh @@ -79,7 +79,10 @@ pipx uninstall pip # install other tools with pipx for TOOL_PATH in $(find ${MY_DIR}/requirements-tools -type f); do TOOL=$(basename ${TOOL_PATH}) - pipx install --pip-args="--require-hashes -r ${TOOL_PATH} --only-binary" ${TOOL} + # uv doesn't provide musl s390x wheels due to Rust issues + if [[ "$TOOL" != "uv" || "$AUDITWHEEL_POLICY" != musllinux* || "$AUDITWHEEL_ARCH" != "s390x" ]]; then + pipx install --pip-args="--require-hashes -r ${TOOL_PATH} --only-binary" ${TOOL} + fi done # We do not need the precompiled .pyc and .pyo files. diff --git a/docker/build_scripts/requirements-tools/uv b/docker/build_scripts/requirements-tools/uv new file mode 100644 index 00000000..9dedf84b --- /dev/null +++ b/docker/build_scripts/requirements-tools/uv @@ -0,0 +1,22 @@ +# This file was autogenerated by uv via the following command: +# nox -s update_python_dependencies +uv==0.1.45 \ + --hash=sha256:088af576fb0e0462cd5f718d03fb1a9f16ce5ae61fdb2a9d3ea938fc826cecc1 \ + --hash=sha256:0f6cfe885f109bacc055edd5df2c837616ae2238b9324a9d37835a96b204ab2f \ + --hash=sha256:110e0f45ddb2fe832ce50b0308be90e5439e0c02d3ffe042feeb3f759811f31f \ + --hash=sha256:2ca2d5a5e06c5f71c7b213e14fa59129e63b77de3ffbcf84ecc98d647d73a821 \ + --hash=sha256:346aa2d0a4ad3c0c3f7852c1edf5e5a8e5d2ef34c7474e9089877291c2da979c \ + --hash=sha256:40fab956bc7af50dfa4bda14e5871528f57603eb9bf8595eb3144aace0ed8c47 \ + --hash=sha256:4e5d55f0f8b6ae416c72d78106e224c8e8338356da21ddebecc7b1723de80924 \ + --hash=sha256:68718add6ee2cef2816f9bf8a1dbf2d8cf63d98ddf45840f340029f65a49fd89 \ + --hash=sha256:7fdb235aaf420fa8ac9009999b1654a23540f03e25c35094543c2f48d7c41aef \ + --hash=sha256:87e77d25e8f358c0d5de1983497ee4cf4cea8fc73373d1ef1063533352db2f89 \ + --hash=sha256:8e2eeea4eec0e09f7d67378152428b5308dba8b33990d045d7a31d19bf18ca1f \ + --hash=sha256:90b68c80dddebeca69b26a2af1e2e683804bcf2b5f22d107af03d9156d6218c6 \ + --hash=sha256:a39141e179fea043151a165c9155031e7976b0e4b076c0c33a45b58a420134e0 \ + --hash=sha256:a601eed14d484d36d421e4208911a56aaf758ea6c385ef8edf8ad9f8ead57ce1 \ + --hash=sha256:b94180009264f3f7ee74250f8e4f99c8cb0cb3633e3a9c9c66cdef3eb69be575 \ + --hash=sha256:cd7f2f64fdded940342dc37234c11ae3508222c3c9b6b0eac5879dcd586010fa \ + --hash=sha256:ddb93620c9e01fa83573c2648df4bee3fa548ca940de51c8a2c3566a23a0c776 \ + --hash=sha256:de81501c0b03160d0944906d1a713f108258360e20c58385974acb7253b56166 + # via -r .nox/update_python_dependencies/tmp/uv.in diff --git a/noxfile.py b/noxfile.py index b0e4c0be..8e136ff8 100644 --- a/noxfile.py +++ b/noxfile.py @@ -4,9 +4,13 @@ import nox +nox.needs_version = ">=2024.4.15" +nox.options.default_venv_backend = "uv|virtualenv" + @nox.session def update_python_dependencies(session): + "Update the base and per-python dependencies lockfiles" if getattr(session.virtualenv, "venv_backend", "") != "uv": session.install("uv>=0.1.23") @@ -60,11 +64,17 @@ def update_python_dependencies(session): @nox.session(python="3.11", reuse_venv=True) def update_native_dependencies(session): - session.install("lastversion>=3.5.0", "packaging", "requests") - session.run("python", "tools/update_native_dependencies.py", *session.posargs) + "Update the native dependencies" + script = "tools/update_native_dependencies.py" + deps = nox.project.load_toml(script)["dependencies"] + session.install(*deps) + session.run("python", script, *session.posargs) @nox.session(python="3.11", reuse_venv=True) def update_interpreters_download(session): - session.install("packaging", "requests") - session.run("python", "tools/update_interpreters_download.py", *session.posargs) + "Update all the Python interpreters" + script = "tools/update_interpreters_download.py" + deps = nox.project.load_toml(script)["dependencies"] + session.install(*deps) + session.run("python", script, *session.posargs) diff --git a/requirements-tools.in b/requirements-tools.in index 5a11bef3..cb04eb9c 100644 --- a/requirements-tools.in +++ b/requirements-tools.in @@ -2,3 +2,4 @@ auditwheel cmake patchelf swig +uv diff --git a/tools/update_interpreters_download.py b/tools/update_interpreters_download.py index 094653e4..5e04662d 100644 --- a/tools/update_interpreters_download.py +++ b/tools/update_interpreters_download.py @@ -1,3 +1,9 @@ +#!/usr/bin/env python + +# /// script +# dependencies = ["packaging", "requests"] +# /// + from __future__ import annotations import argparse diff --git a/tools/update_native_dependencies.py b/tools/update_native_dependencies.py index 32fe7e2f..71b0d2c5 100644 --- a/tools/update_native_dependencies.py +++ b/tools/update_native_dependencies.py @@ -1,3 +1,9 @@ +#!/usr/bin/env python + +# /// script +# dependencies = ["lastversion>=3.5.0", "packaging", "requests"] +# /// + import argparse import hashlib import re