From 26d700b064aa26f1d8abfe3f9a3c78b632b934be Mon Sep 17 00:00:00 2001 From: mayeut Date: Sun, 22 Sep 2024 10:39:23 +0200 Subject: [PATCH 1/4] ci: modernize update workflow - Use official action to grab the Github App auth token - Sign commits (peter-evans/create-pull-request@v7 feature) --- .github/workflows/update-dependencies.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/update-dependencies.yml b/.github/workflows/update-dependencies.yml index 7522baf4..99f0dccd 100644 --- a/.github/workflows/update-dependencies.yml +++ b/.github/workflows/update-dependencies.yml @@ -28,7 +28,7 @@ jobs: git config --global user.email "89297709+manylinux-bot[bot]@users.noreply.github.com" # we use this step to grab a Github App auth token, so that lastversion can query GitHub API # without rate-limit and PRs get run by GHA. - - uses: tibdex/github-app-token@v2 + - uses: actions/create-github-app-token@v1 id: generate-token if: github.ref == 'refs/heads/main' && github.repository == 'pypa/manylinux' with: @@ -53,7 +53,6 @@ jobs: PR generated by "Update dependencies" [workflow](https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}). branch: update-dependencies-pr - committer: "manylinux-bot[bot] <89297709+manylinux-bot[bot]@users.noreply.github.com>" - author: "manylinux-bot[bot] <89297709+manylinux-bot[bot]@users.noreply.github.com>" + sign-commits: true token: ${{ steps.generate-token.outputs.token }} delete-branch: true From 3122b7e4ed695812c5fca697618bec466b328bb2 Mon Sep 17 00:00:00 2001 From: mayeut Date: Sun, 22 Sep 2024 10:56:42 +0200 Subject: [PATCH 2/4] ci: move update dependencies scheduled workflow to Friday Given the time it now takes to rebuild all images, having this on Friday allows for the images to be rebuilt by Monday when cibuildwheel scheduled update workflow runs. --- .github/workflows/update-dependencies.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update-dependencies.yml b/.github/workflows/update-dependencies.yml index 99f0dccd..794c9d1a 100644 --- a/.github/workflows/update-dependencies.yml +++ b/.github/workflows/update-dependencies.yml @@ -6,7 +6,7 @@ on: - '.github/workflows/update-dependencies.yml' workflow_dispatch: schedule: - - cron: '0 18 * * 0' # "At 18:00 on Sunday." + - cron: '0 18 * * 5' # "At 18:00 on Friday." env: FORCE_COLOR: '1' From ccf54a0a487b2bf6c74346bf1c24939c7bfdef65 Mon Sep 17 00:00:00 2001 From: "manylinux-bot[bot]" <89297709+manylinux-bot[bot]@users.noreply.github.com> Date: Sun, 22 Sep 2024 11:29:04 +0200 Subject: [PATCH 3/4] Update python dependencies (#1681) Co-authored-by: manylinux-bot[bot] <89297709+manylinux-bot[bot]@users.noreply.github.com> --- .../build_scripts/requirements-base-tools.txt | 6 +-- docker/build_scripts/requirements-tools/uv | 38 +++++++++---------- docker/build_scripts/requirements3.10.txt | 6 +-- docker/build_scripts/requirements3.11.txt | 6 +-- docker/build_scripts/requirements3.12.txt | 6 +-- docker/build_scripts/requirements3.8.txt | 6 +-- docker/build_scripts/requirements3.9.txt | 6 +-- 7 files changed, 37 insertions(+), 37 deletions(-) diff --git a/docker/build_scripts/requirements-base-tools.txt b/docker/build_scripts/requirements-base-tools.txt index af8b45db..3c4d13c8 100644 --- a/docker/build_scripts/requirements-base-tools.txt +++ b/docker/build_scripts/requirements-base-tools.txt @@ -20,9 +20,9 @@ pipx==1.7.1 \ --hash=sha256:3933c43bb344e649cb28e10d357e0967ce8572f1c19caf90cf39ae95c2a0afaf \ --hash=sha256:762de134e16a462be92645166d225ecef446afaef534917f5f70008d63584360 # via -r requirements-base-tools.in -platformdirs==4.3.3 \ - --hash=sha256:50a5450e2e84f44539718293cbb1da0a0885c9d14adf21b77bae4e66fc99d9b5 \ - --hash=sha256:d4e0b7d8ec176b341fb03cb11ca12d0276faa8c485f9cd218f613840463fc2c0 +platformdirs==4.3.6 \ + --hash=sha256:357fb2acbc885b0419afd3ce3ed34564c13c9b95c89360cd9563f73aa5e2b907 \ + --hash=sha256:73e575e1408ab8103900836b97580d5307456908a03e92031bab39e4554cc3fb # via pipx userpath==1.9.2 \ --hash=sha256:2cbf01a23d655a1ff8fc166dfb78da1b641d1ceabf0fe5f970767d380b14e89d \ diff --git a/docker/build_scripts/requirements-tools/uv b/docker/build_scripts/requirements-tools/uv index dbe44e4f..fc0ecb4e 100644 --- a/docker/build_scripts/requirements-tools/uv +++ b/docker/build_scripts/requirements-tools/uv @@ -1,22 +1,22 @@ # This file was autogenerated by uv via the following command: # nox -s update_python_dependencies -uv==0.4.10 \ - --hash=sha256:0784f75093a75390d8d480cc8a444516e78f08849db9a13c21791a5f651df4a1 \ - --hash=sha256:0f8b9ba4ecfbea343a00e46d509669606e55fe233d800752c4c25650473df358 \ - --hash=sha256:1b6b6c6b8cc0c4e54ab25e3b46e49d1e583e26c194572eb42bfeebf71b39cca2 \ - --hash=sha256:1ff5130b6f3af79c4e47f63db03215aed15e78cb4f1f51682af6f9949c2bcf00 \ - --hash=sha256:2ff29a2f55a697e78d787a41ab41d4b26421d200728289b88b6241d3b486c436 \ - --hash=sha256:30d1f8348a2b18e21a35c97ce42528781f242d0303881fc92fbacdcb653c8bca \ - --hash=sha256:3be73788db9ceacb94a521cf67ca5cc08bac512aef71145b904ab62a3acabdae \ - --hash=sha256:444e1cdb36d7ef103e52185f918800527c255dc369c9f90eb1f198dfa3f4d5bc \ - --hash=sha256:6ba1cc3070e5c63ce0a1421fbed28bd1b3ff520671d7badda11a501504c78394 \ - --hash=sha256:8fa510dfbbde4f8ad5cd2769568c7b0c3e867b74deaf4beabcca79e74e7550cc \ - --hash=sha256:97a1187e11a9df70d55bc577721ad4a19441cda56e4d69fb2f38d88c7650d2a0 \ - --hash=sha256:99954a94dd6c4bff8a9a963c05bc3988214ea39e7511a52fda35112e1a478447 \ - --hash=sha256:a9dc1f8fca5c4a2f73054d9f56c7397e9fc6ba43baefc503d6f0128d72ea662f \ - --hash=sha256:b89dfd213359a23797155ff8175e5202ed6b84aadeb20df92132127608d46acf \ - --hash=sha256:bc87d6c581cfed0979e0f5ee93383d46006c6d4a5e4eb9f43ef13bce61b50cc2 \ - --hash=sha256:bc99e6b45303f0881a8dc199f0b7ea8261dd1779e576e8477a7721ceeeaafcc7 \ - --hash=sha256:e99e3f761875962942e0743b868bd666021d5e14c3df494e820ef8f45fb88578 \ - --hash=sha256:ff9046a8c5e836e892ac7741e672ee016e92e55c659fa8195595df65a1f3accf +uv==0.4.15 \ + --hash=sha256:04858bfd551fabe1635127d9a0afe5c62e1e7d56cf309a9674840c90bfc1f21e \ + --hash=sha256:0e9b78f1a800a4cfdfbdc9ff4e5d4cce34af770f8a1f2b9416b161f294eb3703 \ + --hash=sha256:1401e73f0e8df62b4cfbf394e65a75f18b73bf8a94a6c5653a55bd6fdb8e1bc3 \ + --hash=sha256:1bb79cb06be9bb25a1bf8641bf34593f64a96b3ba66ebd8712954f647d9faa24 \ + --hash=sha256:21a3cedb2276d635543a10a11c61f75c6e387110e23e90cdb6c6dd2e1f3c9453 \ + --hash=sha256:27884429b7fed371fe1fcbe829659c4a259463d0ecacb7891d800e4754b5f24c \ + --hash=sha256:4e40deb2cf2cb403dbaf65209d49c45462ebbb1bff290d4c18b902b5b385cdc9 \ + --hash=sha256:6eef6881abf9b858020ffd23f4e5d77423329da2d4a1bc0af6613c2f698c369a \ + --hash=sha256:7fcf7f3812dd173d39273e99fb2abb0814be6133e7a721baa424cbcfd25b483b \ + --hash=sha256:8d45295757f66d1913e5917c06f1974745adad842403d419362491939be889a6 \ + --hash=sha256:8e36b8e07595fc6216d01e729c81a0b4ff029a93cc2ef987a73d3b650d6d559c \ + --hash=sha256:9822fa4db0d8d50abf5eebe081c01666a98120455090d0b71463d01d5d4153c1 \ + --hash=sha256:9e28141883c0aa8525ad5418e519d8791b7dd75f35020d3b1457db89346c5dc8 \ + --hash=sha256:a5920ff4d114025c51d3f925130ca3b0fad277631846b1109347c24948b29159 \ + --hash=sha256:be46b37b569e3c8ffb7d78022bcc0eadeb987109f709c1cec01b00c261ed9595 \ + --hash=sha256:cf7d554656bb8c5b7710300e04d86ab5137ebdd31fe309d66860a9d474b385f8 \ + --hash=sha256:d16ae6b97eb77f478dfe51d6eb3627048d3f47bd04282d3006e6a212e541dba0 \ + --hash=sha256:e32137ba8202b1291e879e8145113bfb543fcc992b5f043852a96d803788b83c # via -r .nox/update_python_dependencies/tmp/uv.in diff --git a/docker/build_scripts/requirements3.10.txt b/docker/build_scripts/requirements3.10.txt index 70ae998c..2c043ae7 100644 --- a/docker/build_scripts/requirements3.10.txt +++ b/docker/build_scripts/requirements3.10.txt @@ -22,9 +22,9 @@ pyproject-hooks==1.1.0 \ --hash=sha256:4b37730834edbd6bd37f26ece6b44802fb1c1ee2ece0e54ddff8bfc06db86965 \ --hash=sha256:7ceeefe9aec63a1064c18d939bdc3adf2d8aa1988a510afec15151578b232aa2 # via build -setuptools==75.0.0 ; python_full_version < '3.13' and implementation_name != 'graalpy' \ - --hash=sha256:25af69c809d9334cd8e653d385277abeb5a102dca255954005a7092d282575ea \ - --hash=sha256:791ae94f04f78c880b5e614e560dd32d4b4af5d151bd9e7483e3377846caf90a +setuptools==75.1.0 ; python_full_version < '3.13' and implementation_name != 'graalpy' \ + --hash=sha256:35ab7fd3bcd95e6b7fd704e4a1539513edad446c097797f2985e0e4b960772f2 \ + --hash=sha256:d59a21b17a275fb872a9c3dae73963160ae079f1049ed956880cd7c09b120538 # via -r requirements.in tomli==2.0.1 ; python_full_version < '3.11' \ --hash=sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc \ diff --git a/docker/build_scripts/requirements3.11.txt b/docker/build_scripts/requirements3.11.txt index 283d5f0d..6b1d361f 100644 --- a/docker/build_scripts/requirements3.11.txt +++ b/docker/build_scripts/requirements3.11.txt @@ -18,9 +18,9 @@ pyproject-hooks==1.1.0 \ --hash=sha256:4b37730834edbd6bd37f26ece6b44802fb1c1ee2ece0e54ddff8bfc06db86965 \ --hash=sha256:7ceeefe9aec63a1064c18d939bdc3adf2d8aa1988a510afec15151578b232aa2 # via build -setuptools==75.0.0 ; python_full_version < '3.13' and implementation_name != 'graalpy' \ - --hash=sha256:25af69c809d9334cd8e653d385277abeb5a102dca255954005a7092d282575ea \ - --hash=sha256:791ae94f04f78c880b5e614e560dd32d4b4af5d151bd9e7483e3377846caf90a +setuptools==75.1.0 ; python_full_version < '3.13' and implementation_name != 'graalpy' \ + --hash=sha256:35ab7fd3bcd95e6b7fd704e4a1539513edad446c097797f2985e0e4b960772f2 \ + --hash=sha256:d59a21b17a275fb872a9c3dae73963160ae079f1049ed956880cd7c09b120538 # via -r requirements.in wheel==0.44.0 ; python_full_version < '3.13' \ --hash=sha256:2376a90c98cc337d18623527a97c31797bd02bad0033d41547043a1cbfbe448f \ diff --git a/docker/build_scripts/requirements3.12.txt b/docker/build_scripts/requirements3.12.txt index 283d5f0d..6b1d361f 100644 --- a/docker/build_scripts/requirements3.12.txt +++ b/docker/build_scripts/requirements3.12.txt @@ -18,9 +18,9 @@ pyproject-hooks==1.1.0 \ --hash=sha256:4b37730834edbd6bd37f26ece6b44802fb1c1ee2ece0e54ddff8bfc06db86965 \ --hash=sha256:7ceeefe9aec63a1064c18d939bdc3adf2d8aa1988a510afec15151578b232aa2 # via build -setuptools==75.0.0 ; python_full_version < '3.13' and implementation_name != 'graalpy' \ - --hash=sha256:25af69c809d9334cd8e653d385277abeb5a102dca255954005a7092d282575ea \ - --hash=sha256:791ae94f04f78c880b5e614e560dd32d4b4af5d151bd9e7483e3377846caf90a +setuptools==75.1.0 ; python_full_version < '3.13' and implementation_name != 'graalpy' \ + --hash=sha256:35ab7fd3bcd95e6b7fd704e4a1539513edad446c097797f2985e0e4b960772f2 \ + --hash=sha256:d59a21b17a275fb872a9c3dae73963160ae079f1049ed956880cd7c09b120538 # via -r requirements.in wheel==0.44.0 ; python_full_version < '3.13' \ --hash=sha256:2376a90c98cc337d18623527a97c31797bd02bad0033d41547043a1cbfbe448f \ diff --git a/docker/build_scripts/requirements3.8.txt b/docker/build_scripts/requirements3.8.txt index 70ae998c..2c043ae7 100644 --- a/docker/build_scripts/requirements3.8.txt +++ b/docker/build_scripts/requirements3.8.txt @@ -22,9 +22,9 @@ pyproject-hooks==1.1.0 \ --hash=sha256:4b37730834edbd6bd37f26ece6b44802fb1c1ee2ece0e54ddff8bfc06db86965 \ --hash=sha256:7ceeefe9aec63a1064c18d939bdc3adf2d8aa1988a510afec15151578b232aa2 # via build -setuptools==75.0.0 ; python_full_version < '3.13' and implementation_name != 'graalpy' \ - --hash=sha256:25af69c809d9334cd8e653d385277abeb5a102dca255954005a7092d282575ea \ - --hash=sha256:791ae94f04f78c880b5e614e560dd32d4b4af5d151bd9e7483e3377846caf90a +setuptools==75.1.0 ; python_full_version < '3.13' and implementation_name != 'graalpy' \ + --hash=sha256:35ab7fd3bcd95e6b7fd704e4a1539513edad446c097797f2985e0e4b960772f2 \ + --hash=sha256:d59a21b17a275fb872a9c3dae73963160ae079f1049ed956880cd7c09b120538 # via -r requirements.in tomli==2.0.1 ; python_full_version < '3.11' \ --hash=sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc \ diff --git a/docker/build_scripts/requirements3.9.txt b/docker/build_scripts/requirements3.9.txt index 70ae998c..2c043ae7 100644 --- a/docker/build_scripts/requirements3.9.txt +++ b/docker/build_scripts/requirements3.9.txt @@ -22,9 +22,9 @@ pyproject-hooks==1.1.0 \ --hash=sha256:4b37730834edbd6bd37f26ece6b44802fb1c1ee2ece0e54ddff8bfc06db86965 \ --hash=sha256:7ceeefe9aec63a1064c18d939bdc3adf2d8aa1988a510afec15151578b232aa2 # via build -setuptools==75.0.0 ; python_full_version < '3.13' and implementation_name != 'graalpy' \ - --hash=sha256:25af69c809d9334cd8e653d385277abeb5a102dca255954005a7092d282575ea \ - --hash=sha256:791ae94f04f78c880b5e614e560dd32d4b4af5d151bd9e7483e3377846caf90a +setuptools==75.1.0 ; python_full_version < '3.13' and implementation_name != 'graalpy' \ + --hash=sha256:35ab7fd3bcd95e6b7fd704e4a1539513edad446c097797f2985e0e4b960772f2 \ + --hash=sha256:d59a21b17a275fb872a9c3dae73963160ae079f1049ed956880cd7c09b120538 # via -r requirements.in tomli==2.0.1 ; python_full_version < '3.11' \ --hash=sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc \ From 6238f5b85ef039cfc904b9b489a53155da24012e Mon Sep 17 00:00:00 2001 From: Matthieu Darbois Date: Sun, 22 Sep 2024 20:32:02 +0200 Subject: [PATCH 4/4] feat: prepare run_tests.sh for manylinux_2_34 (#1682) Prepare run_tests.sh for manylinux_2_34 This also allows other manylinux-like projects to run the same tests as manylinux without the same number of CPython installations. --- tests/run_tests.sh | 55 +++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 30 deletions(-) diff --git a/tests/run_tests.sh b/tests/run_tests.sh index 61bdf85a..9db65bee 100755 --- a/tests/run_tests.sh +++ b/tests/run_tests.sh @@ -6,17 +6,6 @@ set -exuo pipefail # Get script directory MY_DIR=$(dirname "${BASH_SOURCE[0]}") -if [ "${AUDITWHEEL_POLICY}" == "manylinux2014" ]; then - PACKAGE_MANAGER=yum -elif [ "${AUDITWHEEL_POLICY:0:10}" == "musllinux_" ]; then - PACKAGE_MANAGER=apk -elif [ "${AUDITWHEEL_POLICY}" == "manylinux_2_28" ]; then - PACKAGE_MANAGER=dnf -else - echo "Unsupported policy: '${AUDITWHEEL_POLICY}'" - exit 1 -fi - if [ "${AUDITWHEEL_POLICY:0:10}" == "musllinux_" ]; then EXPECTED_PYTHON_COUNT=9 EXPECTED_PYTHON_COUNT_ALL=9 @@ -32,6 +21,14 @@ else EXPECTED_PYTHON_COUNT_ALL=9 fi fi + +# the following environment variable allows other manylinux-like projects to run +# the same tests as manylinux without the same number of CPython installations +if [ "${ADJUST_CPYTHON_COUNT:-}" != "" ]; then + EXPECTED_PYTHON_COUNT=$(( ${EXPECTED_PYTHON_COUNT} ${ADJUST_CPYTHON_COUNT} )) + EXPECTED_PYTHON_COUNT_ALL=$(( ${EXPECTED_PYTHON_COUNT_ALL} ${ADJUST_CPYTHON_COUNT} )) +fi + PYTHON_COUNT=$(manylinux-interpreters list --installed | wc -l) if [ ${EXPECTED_PYTHON_COUNT} -ne ${PYTHON_COUNT} ]; then echo "unexpected number of default python installations: ${PYTHON_COUNT}, expecting ${EXPECTED_PYTHON_COUNT}" @@ -65,7 +62,7 @@ for PYTHON in /opt/python/*/bin/python; do if [ "${IMPLEMENTATION}" == "cpython" ]; then # Make sure sqlite3 module can be loaded properly and is the manylinux version one # c.f. https://github.com/pypa/manylinux/issues/1030 - $PYTHON -c 'import sqlite3; print(sqlite3.sqlite_version); assert sqlite3.sqlite_version_info[0:2] >= (3, 34)' + $PYTHON -c 'import sqlite3; print(sqlite3.sqlite_version); assert sqlite3.sqlite_version_info[0:2] >= (3, 31)' # Make sure tkinter module can be loaded properly $PYTHON -c 'import tkinter; print(tkinter.TkVersion); assert tkinter.TkVersion >= 8.6' # cpython shall be available as python @@ -129,35 +126,33 @@ patchelf --version git --version cmake --version swig -version -sqlite3 --version pipx run nox --version pipx install --pip-args='--no-python-version-warning --no-input' nox nox --version tar --version | grep "GNU tar" +# we stopped installing sqlite3 after manylinux_2_28 / musllinux_1_2 +if [ "${AUDITWHEEL_POLICY}" == "manylinux2014" ] || [ "${AUDITWHEEL_POLICY}" == "manylinux_2_28" ] || [ "${AUDITWHEEL_POLICY}" == "musllinux_1_1" ] || [ "${AUDITWHEEL_POLICY}" == "musllinux_1_2" ]; then + sqlite3 --version +fi # check libcrypt.so.1 can be loaded by some system packages, # as LD_LIBRARY_PATH might not be enough. # c.f. https://github.com/pypa/manylinux/issues/1022 -if [ "${PACKAGE_MANAGER}" == "yum" ]; then +if [ "${AUDITWHEEL_POLICY}" == "manylinux2014" ]; then yum -y install openssh-clients -elif [ "${PACKAGE_MANAGER}" == "apk" ]; then - apk add --no-cache openssh-client -elif [ "${PACKAGE_MANAGER}" == "dnf" ]; then - dnf -y install --allowerasing openssh-clients -else - echo "Unsupported package manager: '${PACKAGE_MANAGER}'" - exit 1 + eval "$(ssh-agent)" + eval "$(ssh-agent -k)" fi -eval "$(ssh-agent)" -eval "$(ssh-agent -k)" -# compilation tests, intended to ensure appropriate headers, pkg_config, etc. -# are available for downstream compile against installed tools -source_dir="${MY_DIR}/ctest" -build_dir="$(mktemp -d)" -cmake -S "${source_dir}" -B "${build_dir}" -cmake --build "${build_dir}" -(cd "${build_dir}"; ctest --output-on-failure) +if [ "${AUDITWHEEL_POLICY}" == "manylinux2014" ] || [ "${AUDITWHEEL_POLICY}" == "manylinux_2_28" ] || [ "${AUDITWHEEL_POLICY}" == "musllinux_1_1" ] || [ "${AUDITWHEEL_POLICY}" == "musllinux_1_2" ]; then + # sqlite compilation tests, intended to ensure appropriate headers, pkg_config, etc. + # are available for downstream compile against installed tools + source_dir="${MY_DIR}/ctest" + build_dir="$(mktemp -d)" + cmake -S "${source_dir}" -B "${build_dir}" + cmake --build "${build_dir}" + (cd "${build_dir}"; ctest --output-on-failure) +fi # https://github.com/pypa/manylinux/issues/1060 # wrong /usr/local/man symlink