mirror of
https://gh.wpcy.net/https://github.com/WeblateOrg/weblate.git
synced 2026-05-01 04:53:50 +08:00
It should use Python installed in the container and not attempt to use something else. Fixes #13326
26 lines
703 B
Bash
Executable file
26 lines
703 B
Bash
Executable file
#!/bin/sh
|
|
|
|
# Copyright © Michal Čihař <michal@weblate.org>
|
|
#
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
set -e
|
|
|
|
cd /app/src
|
|
|
|
echo "Exporting Weblate requirements..."
|
|
uv export --no-config --format requirements-txt --python /usr/local/bin/python --all-extras --no-sources > /tmp/requirements.txt
|
|
|
|
echo "Checking /app/venv..."
|
|
if [ ! -f /app/venv/bin/activate ]; then
|
|
uv venv --no-config /app/venv
|
|
fi
|
|
echo "/app/data/python" > "/app/venv/lib/python${PYVERSION}/site-packages/weblate-docker.pth"
|
|
# shellcheck disable=SC1091
|
|
. /app/venv/bin/activate
|
|
|
|
echo "Installing Weblate requirements..."
|
|
uv pip install --no-config -r /tmp/requirements.txt
|
|
|
|
echo "Starting Weblate..."
|
|
exec /app/bin/start "$@"
|