mirror of
https://gh.wpcy.net/https://github.com/WeblateOrg/weblate.git
synced 2026-04-26 22:07:26 +08:00
42 lines
1.4 KiB
Bash
Executable file
42 lines
1.4 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}" = migrations ]; then
|
|
uv pip install --system -e ".[all,mysql,ci]"
|
|
else
|
|
if [ "${1:-latest}" = minimal ]; then
|
|
# Adjust deps to force minimal version
|
|
sed -i '/^ *"/ s/>=/==/' pyproject.toml
|
|
fi
|
|
|
|
if [ "${1:-latest}" = mypy ]; then
|
|
uv pip install --system -e ".[all,mysql,ci,mypy,test]"
|
|
else
|
|
# TODO: lxml can use wheels once xmlsec has one
|
|
# see https://github.com/xmlsec/python-xmlsec/issues/327
|
|
if python -c 'import sys; sys.exit(0 if sys.version_info >= (3,13) else 1)'; then
|
|
uv pip install --system --no-binary=lxml -e ".[all,mysql,ci,test]"
|
|
else
|
|
uv pip install --system -e ".[all,mysql,ci,test]"
|
|
fi
|
|
fi
|
|
if [ "${1:-latest}" = edge ]; then
|
|
uv pip install --system --upgrade -e ".[all,mysql,test,ci]"
|
|
# Install from git / pre-release
|
|
uv pip install --system --no-deps --upgrade --force-reinstall \
|
|
https://github.com/translate/translate/archive/master.zip \
|
|
https://github.com/WeblateOrg/language-data/archive/main.zip \
|
|
https://github.com/WeblateOrg/translation-finder/archive/main.zip
|
|
uv pip install --system --upgrade --pre Django
|
|
fi
|
|
fi
|
|
|
|
# Verify that deps are consistent
|
|
if [ "${1:-latest}" != edge ]; then
|
|
uv pip check
|
|
fi
|