summaryrefslogtreecommitdiffstats
path: root/src/script
diff options
context:
space:
mode:
authorJohn Mulligan <jmulligan@redhat.com>2024-06-14 16:07:07 +0200
committerJohn Mulligan <jmulligan@redhat.com>2024-06-14 16:07:07 +0200
commite1a3d068837073dcc8604cecae9be5235e5b620b (patch)
tree347e750b2b58f197f6f33ca1e23b0b415a6af6d0 /src/script
parentMerge pull request #58007 from zdover23/wip-doc-2024-06-13-rados-operations (diff)
downloadceph-e1a3d068837073dcc8604cecae9be5235e5b620b.tar.xz
ceph-e1a3d068837073dcc8604cecae9be5235e5b620b.zip
script/cpatch.py: add support for multiple valid python versions
Fix running cpatch.py with the latest centos9s based container images. Future proof a little by adding multiple valid, existing, python version numbers to probe. Signed-off-by: John Mulligan <jmulligan@redhat.com>
Diffstat (limited to 'src/script')
-rwxr-xr-xsrc/script/cpatch.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/script/cpatch.py b/src/script/cpatch.py
index fa1cecc5943..4ff9bd999d2 100755
--- a/src/script/cpatch.py
+++ b/src/script/cpatch.py
@@ -549,9 +549,9 @@ class Builder:
if self._cached_py_site_packages is not None:
return self._cached_py_site_packages
# use the container image to probe for the correct python site-packages dir
+ py_vers = ['3.12', '3.11', '3.10', '3.9', '3.8', '3.6']
valid_site_packages = [
- "/usr/lib/python3.8/site-packages",
- "/usr/lib/python3.6/site-packages",
+ f'/usr/lib/python{v}/site-packages' for v in py_vers
]
cmd = [
self._ctx.engine,