diff options
| author | Michal Arbet <michal.arbet@ultimum.io> | 2024-08-21 14:08:34 +0200 |
|---|---|---|
| committer | Michal Arbet <michal.arbet@ultimum.io> | 2024-09-19 12:22:16 +0200 |
| commit | 1cda1acc7fd22bc42917c723f14c6ee076098297 (patch) | |
| tree | f8d37bd7c857169ab6ffa38df81da45f60e1fcaa /docker/horizon | |
| parent | 015fd8d42a42a49243970c703fd513d3d5b2ce74 (diff) | |
| download | kolla-1cda1acc7fd22bc42917c723f14c6ee076098297.tar.gz kolla-1cda1acc7fd22bc42917c723f14c6ee076098297.zip | |
Switch to Dynamic Python Version Detection
This commit removes the hardcoded KOLLA_DISTRO_PYTHON_VERSION
and replaces it with dynamic Python version detection during
container images build. Dockerfiles and scripts now use general
python3 references, simplifying maintenance and ensuring
compatibility with future Python versions.
Test cases relying on distro_python_version were also cleaned up.
Change-Id: I891749598247a5e951ed4a873b16acfd0566f59c
Diffstat (limited to 'docker/horizon')
| -rw-r--r-- | docker/horizon/Dockerfile.j2 | 2 | ||||
| -rw-r--r-- | docker/horizon/extend_start.sh | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/docker/horizon/Dockerfile.j2 b/docker/horizon/Dockerfile.j2 index cec72a177..d9d6b32a5 100644 --- a/docker/horizon/Dockerfile.j2 +++ b/docker/horizon/Dockerfile.j2 @@ -66,7 +66,7 @@ RUN ln -s horizon-source/* horizon \ && if [ "$(ls /plugins)" ]; then \ {{ macros.install_pip(horizon_plugins_pip_packages) }}; \ fi \ - && for locale in /var/lib/kolla/venv/lib/python{{distro_python_version}}/site-packages/*/locale; do \ + && for locale in /var/lib/kolla/venv/lib/python3/site-packages/*/locale; do \ (cd ${locale%/*} && /var/lib/kolla/venv/bin/django-admin compilemessages) \ done \ && chmod 644 /usr/local/bin/kolla_extend_start diff --git a/docker/horizon/extend_start.sh b/docker/horizon/extend_start.sh index 5a71d6be1..63a40189d 100644 --- a/docker/horizon/extend_start.sh +++ b/docker/horizon/extend_start.sh @@ -5,7 +5,7 @@ set -o errexit FORCE_GENERATE="${FORCE_GENERATE:-no}" HASH_PATH=/var/lib/kolla/.settings.md5sum.txt -SITE_PACKAGES="/var/lib/kolla/venv/lib/python${KOLLA_DISTRO_PYTHON_VERSION}/site-packages" +SITE_PACKAGES="/var/lib/kolla/venv/lib/python3/site-packages" MANAGE_PY="/var/lib/kolla/venv/bin/python /var/lib/kolla/venv/bin/manage.py" |
