mirror of
https://gh.wpcy.net/https://github.com/WeblateOrg/weblate.git
synced 2026-04-25 04:22:21 +08:00
35 lines
1.6 KiB
Bash
Executable file
35 lines
1.6 KiB
Bash
Executable file
#!/bin/sh
|
|
|
|
# Copyright © Michal Čihař <michal@weblate.org>
|
|
#
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
set -e -x
|
|
|
|
if [ "${1:-latest}" = minimal ]; then
|
|
# Adjust deps to force minimal version
|
|
sed -i '/^ *"/ s/>=/==/' pyproject.toml
|
|
uv sync --no-binary-package lxml --no-binary-package xmlsec --all-extras --dev
|
|
elif [ "${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
|