Skip to content

Commit

Permalink
script/cpatch.py: add support for multiple valid python versions
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
phlogistonjohn committed Jun 14, 2024
1 parent 324cbc9 commit e1a3d06
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/script/cpatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -549,9 +549,9 @@ def _py_site_packages(self):
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,
Expand Down

0 comments on commit e1a3d06

Please sign in to comment.