[llvm] [test-release.sh] Fix python 3.12 compatibility (PR #105993)

Keith Smiley via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 25 10:18:03 PDT 2024


https://github.com/keith created https://github.com/llvm/llvm-project/pull/105993

Virtual environments in python 3.12 no longer installs setuptools by default in order to push people towards newer syntax for installing packages. This new syntax is also compatible with python 3.8 which is the current lowest supported version mentioned in the docs.

Docs: https://packaging.python.org/en/latest/discussions/setup-py-deprecated/#what-commands-should-be-used-instead

Fixes: https://github.com/llvm/llvm-project/issues/90197

>From 606b4720ab2e3ac2be5957f563d3d6e82cdf4677 Mon Sep 17 00:00:00 2001
From: Keith Smiley <keithbsmiley at gmail.com>
Date: Sun, 25 Aug 2024 10:15:52 -0700
Subject: [PATCH] [test-release.sh] Fix python 3.12 compatibility

Virtual environments in python 3.12 no longer installs setuptools by
default in order to push people towards newer syntax for installing
packages. This new syntax is also compatible with python 3.8 which is
the current lowest supported version mentioned in the docs.

Docs: https://packaging.python.org/en/latest/discussions/setup-py-deprecated/#what-commands-should-be-used-instead

Fixes: https://github.com/llvm/llvm-project/issues/90197
---
 llvm/utils/release/test-release.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/llvm/utils/release/test-release.sh b/llvm/utils/release/test-release.sh
index 050004aa08c493..2dbc9d281dc697 100755
--- a/llvm/utils/release/test-release.sh
+++ b/llvm/utils/release/test-release.sh
@@ -647,7 +647,7 @@ if [ $do_test_suite = "yes" ]; then
   TestSuiteSrcDir="$BuildDir/llvm-test-suite"
 
   ${venv} $SandboxDir
-  $SandboxDir/bin/python $BuildDir/llvm-project/llvm/utils/lit/setup.py install
+  $SandboxDir/bin/python -m pip install $BuildDir/llvm-project/llvm/utils/lit
   mkdir -p $TestSuiteBuildDir
 fi
 



More information about the llvm-commits mailing list