]> git.ipfire.org Git - thirdparty/rsync.git/commitdiff
ci(almalinux-8): use python39 module for runtests.py master
authorAndrew Tridgell <andrew@tridgell.net>
Wed, 6 May 2026 19:34:54 +0000 (05:34 +1000)
committerAndrew Tridgell <andrew@tridgell.net>
Wed, 6 May 2026 19:47:29 +0000 (05:47 +1000)
The default python3 on AlmaLinux 8 is 3.6, but runtests.py uses
subprocess.run(capture_output=...) and check_output(text=...) which
were introduced in 3.7. Install the python39 module stream and point
/usr/bin/python3 at it via alternatives so the existing shebang
resolves correctly.

Reproduced as: TypeError: __init__() got an unexpected keyword
argument 'capture_output' at runtests.py line 75.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
.github/workflows/almalinux-8-build.yml

index 8c4bb68a037f25a8acfd88644864c02460105dd9..9d7ea782e75779c15db7ce4c9149852f81e6dbd8 100644 (file)
@@ -35,17 +35,21 @@ jobs:
         fetch-depth: 0
     - name: prep
       # PowerTools is needed for libzstd-devel etc; xxhash and lz4 dev
-      # headers live in EPEL on RHEL 8.
+      # headers live in EPEL on RHEL 8. The default python3 on RHEL 8
+      # is 3.6, which is too old for runtests.py (uses capture_output=
+      # / text= introduced in 3.7), so install python39 and point
+      # /usr/bin/python3 at it.
       run: |
         dnf -y install epel-release
         dnf config-manager --set-enabled powertools
         dnf -y install gcc gcc-c++ make autoconf automake m4 \
-            python3 python3-pip diffutils \
+            python39 python39-pip diffutils \
             openssl openssl-devel \
             attr libattr-devel acl libacl-devel \
             zstd libzstd-devel \
             lz4 lz4-devel \
             xxhash xxhash-devel
+        alternatives --set python3 /usr/bin/python3.9
         pip3 install commonmark
     - name: configure
       run: ./configure --with-rrsync