weblate/dev-docker/weblate-dev/start-dev
Michal Čihař 0dbae2610c fix: avoid using uv .. --no-sources
We no longer have source dependency in pyproject.toml so that did
nothing and it is now not compatible with some other args.
2025-04-30 08:29:16 +02:00

30 lines
745 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/bin/python3 --all-extras > /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 \
--no-binary xmlsec \
--no-binary lxml \
-r /tmp/requirements.txt
echo "Starting Weblate..."
exec /app/bin/start "$@"