weblate/ci/pip-install
Michal Čihař 460d81a083 ci: Cache cffi wheel
This allows to reuse it in migrations testsing
2022-07-01 08:09:41 +02:00

28 lines
1.2 KiB
Bash
Executable file
Vendored

#!/bin/sh
set -e -x
python -m pip install -r requirements-ci.txt
pip install --no-binary :all: cffi
pip install -r requirements-test.txt
# Workaround for
# SystemError: ffi_prep_closure(): bad user_data (it seems that the version of the libffi library seen at runtime is different from the 'ffi.h' file seen at compile-time)
if [ ${1:-latest} = minimal ] ; then
requirements-builder --req requirements.txt --level min > requirements-min.txt
requirements-builder --req requirements-optional.txt --level min >> requirements-min.txt
# Install cython and pycairo first, these are needed during install of others
pip install $(grep -E '^(Cython|pycairo)==' requirements-min.txt)
pip install -r requirements-min.txt
else
pip install Cython pycairo
pip install --upgrade-strategy eager -U -r requirements-optional.txt
if [ ${1:-latest} = edge ] ; then
pip install --upgrade https://github.com/translate/translate/archive/master.zip
pip install --upgrade https://github.com/WeblateOrg/language-data/archive/main.zip
pip install --upgrade https://github.com/WeblateOrg/translation-finder/archive/main.zip
pip install --upgrade --pre Django
fi
fi
# Verify that deps are consistent
pip check