weblate/ci/pip-install
Michal Čihař 68e6c1796e
feat(deps): pin exact versions of dependencies (#19355)
This gives us tigther control on the runtime environment and we stop
pretending that all combinations of dependency versions in the range are
supposed to work, because it was never possible to test.

See #18681
2026-05-06 10:18:25 +00:00

31 lines
1.4 KiB
Bash
Executable file
Vendored

#!/bin/sh
# Copyright © Michal Čihař <michal@weblate.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
set -e -x
if [ "${1:-latest}" = edge ]; then
# Install from git / pre-release
mkdir -p build/packages
# Fetch current snapshots
curl -LsSf https://github.com/translate/translate/archive/master.zip > build/packages/translate-toolkit.zip
curl -LsSf https://github.com/WeblateOrg/language-data/archive/main.zip > build/packages/weblate-language-data.zip
curl -LsSf https://github.com/WeblateOrg/translation-finder/archive/main.zip > build/packages/transaltion-finder.zip
# TODO: lxml can use wheels once xmlsec has resolved possible compatibility issues
# see https://github.com/xmlsec/python-xmlsec/issues/356
# Add downloaded zip, cannot add URL as uv complains about missing checksum
uv add --no-binary-package lxml --no-binary-package xmlsec build/packages/*
# Allow pre-releases
uv sync --all-extras --dev --no-binary-package lxml --no-binary-package xmlsec --prerelease allow --upgrade
else
# TODO: lxml can use wheels once xmlsec has resolved possible compatibility issues
# see https://github.com/xmlsec/python-xmlsec/issues/356
uv sync --frozen --all-extras --dev --no-binary-package lxml --no-binary-package xmlsec
fi
# Verify that deps are consistent
if [ "${1:-latest}" != edge ]; then
uv pip check
fi