]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
test/run-cli-tests: install wheel before cram to fix build failure 66733/head
authorKefu Chai <k.chai@proxmox.com>
Wed, 24 Dec 2025 08:57:12 +0000 (16:57 +0800)
committerKefu Chai <k.chai@proxmox.com>
Wed, 24 Dec 2025 09:08:53 +0000 (17:08 +0800)
Fix the run-cli-tests failure that occurs when installing cram from git.
The error happens because the fresh venv lacks build dependencies, causing
pip to fall back to legacy setup.py install which fails:

  Using legacy 'setup.py install' for cram, since package 'wheel' is not installed.
  Installing collected packages: cram
    Running setup.py install for cram: started
    error: subprocess-exited-with-error

    × Running setup.py install for cram did not run successfully.
    │ exit code: 1
    ╰─> See above for output.

    note: This error originates from a subprocess, and is likely not a problem with pip.
    Running setup.py install for cram: finished with status 'error'
  error: legacy-install-failure

  × Encountered error while trying to install package.
  ╰─> cram

The issue became visible after commit 70880723eaa updated the pip URL
format to the new PEP 440 style, which exposed the missing build tools.

Solution: Upgrade pip, setuptools, and wheel before installing cram to
ensure proper wheel-based installation works correctly with Python 3.13
and modern pip versions.

Signed-off-by: Kefu Chai <k.chai@proxmox.com>
src/test/run-cli-tests

index 3a29f140319e13055c5ba206eb00e0c535cd3fcb..875ca7220c34d21d611396e74b32fe07403e2e0f 100755 (executable)
@@ -26,6 +26,7 @@ if [ ! -e "$CRAM_BIN" ]; then
     # https://bitbucket.org/brodie/cram/issue/9/allow-read-only-directories-for-t
     # -- tv@inktank.com
     python3 -m venv "$VENV" && $VENV/bin/pip --log "$VENV"/log.txt \
+        install --upgrade pip setuptools wheel && $VENV/bin/pip --log "$VENV"/log.txt \
         install 'cram@git+https://github.com/ceph/cram.git@0.7-error-dir'
 fi