zulip/tools/update-locked-requirements

21 lines
864 B
Plaintext
Raw Normal View History

#!/usr/bin/env bash
set -e
# Make sure the Zulip dev virtualenv exists, and operate within it.
if [ ! -d /srv/zulip-py3-venv ]; then
./tools/setup/setup_venvs.py
fi
source /srv/zulip-py3-venv/bin/activate
pip-compile --output-file requirements/prod_lock.txt requirements/prod.txt
pip-compile --output-file requirements/dev_lock.txt requirements/dev.txt
# Remove the editable flag in the lock files. It's there because pip-compile
# can't yet do without it (see https://github.com/jazzband/pip-tools/issues/272
# upstream), but in the output of pip-compile it's no longer needed.
sed -i 's/-e //' requirements/prod_lock.txt requirements/dev_lock.txt
# pip-tools bug; future, futures are obsolete in python3
sed -i '/futures==/d' requirements/prod_lock.txt requirements/dev_lock.txt
sed -i '/future==/d' requirements/prod_lock.txt requirements/dev_lock.txt