add suse_py311 flavor to explicitly render templates for py311
This is needed when py 3.11 is not the primary python version (e.g. SLE15). Change-Id: I362ec318a0c63f54469eb3267b5b8d868856bbdf
This commit is contained in:
parent
3c045314de
commit
520ee43dab
|
@ -118,6 +118,20 @@ def default_suse_py39_tr(mod):
|
||||||
return (pkg, py2pkg, py3pkg)
|
return (pkg, py2pkg, py3pkg)
|
||||||
|
|
||||||
|
|
||||||
|
def default_suse_py311_tr(mod):
|
||||||
|
"""
|
||||||
|
Default translation function for openSUSE, SLES, and other
|
||||||
|
SUSE based systems that have python 3.11
|
||||||
|
|
||||||
|
Returns a tuple of 3 elements - the unversioned name, the python2 versioned
|
||||||
|
name and the python3 versioned name.
|
||||||
|
"""
|
||||||
|
pkg = 'python-%s' % mod
|
||||||
|
py2pkg = 'python2-%s' % mod
|
||||||
|
py3pkg = 'python311-%s' % mod
|
||||||
|
return (pkg, py2pkg, py3pkg)
|
||||||
|
|
||||||
|
|
||||||
def openstack_prefix_tr(mod):
|
def openstack_prefix_tr(mod):
|
||||||
pkg = 'openstack-' + mod.lower()
|
pkg = 'openstack-' + mod.lower()
|
||||||
return (pkg, pkg, pkg)
|
return (pkg, pkg, pkg)
|
||||||
|
@ -330,6 +344,11 @@ SUSE_PY39_PKG_MAP.extend([
|
||||||
SingleRule('devel', 'python-devel', 'python39-devel'),
|
SingleRule('devel', 'python-devel', 'python39-devel'),
|
||||||
])
|
])
|
||||||
|
|
||||||
|
SUSE_PY311_PKG_MAP = SUSE_COMMON_PKG_MAP
|
||||||
|
SUSE_PY311_PKG_MAP.extend([
|
||||||
|
SingleRule('devel', 'python-devel', 'python311-devel'),
|
||||||
|
])
|
||||||
|
|
||||||
UBUNTU_PKG_MAP = [
|
UBUNTU_PKG_MAP = [
|
||||||
SingleRule('glance_store', 'python-glance-store'),
|
SingleRule('glance_store', 'python-glance-store'),
|
||||||
SingleRule('GitPython', 'python-git'),
|
SingleRule('GitPython', 'python-git'),
|
||||||
|
@ -369,6 +388,8 @@ def get_pkg_map(dist):
|
||||||
d_lower = dist.lower()
|
d_lower = dist.lower()
|
||||||
if 'suse_py39' in d_lower:
|
if 'suse_py39' in d_lower:
|
||||||
return SUSE_PY39_PKG_MAP
|
return SUSE_PY39_PKG_MAP
|
||||||
|
if 'suse_py311' in d_lower:
|
||||||
|
return SUSE_PY311_PKG_MAP
|
||||||
if 'suse' in d_lower or 'sles' in d_lower:
|
if 'suse' in d_lower or 'sles' in d_lower:
|
||||||
return SUSE_PKG_MAP
|
return SUSE_PKG_MAP
|
||||||
if 'ubuntu' in d_lower:
|
if 'ubuntu' in d_lower:
|
||||||
|
@ -380,6 +401,8 @@ def get_default_tr_func(dist):
|
||||||
d_lower = dist.lower()
|
d_lower = dist.lower()
|
||||||
if 'suse_py39' in d_lower:
|
if 'suse_py39' in d_lower:
|
||||||
return default_suse_py39_tr
|
return default_suse_py39_tr
|
||||||
|
if 'suse_py311' in d_lower:
|
||||||
|
return default_suse_py311_tr
|
||||||
if 'suse' in d_lower or 'sles' in d_lower:
|
if 'suse' in d_lower or 'sles' in d_lower:
|
||||||
return default_suse_tr
|
return default_suse_tr
|
||||||
if 'ubuntu' in d_lower:
|
if 'ubuntu' in d_lower:
|
||||||
|
|
Loading…
Reference in New Issue