zulip/tools/update-locked-requirements

26 lines
882 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
# Add the editable flag to mypy for the purpose of building the lockfile for
# dev.txt
sed -i 's/git/-e git/' requirements/mypy.txt
pip-compile --output-file requirements/dev_lock.txt requirements/dev.txt
sed -i 's/-e git/git/' requirements/mypy.txt
# Remove the editable flag in the lock file for safer build
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
sed -i '/future==/d' requirements/prod_lock.txt
sed -i '/futures==/d' requirements/dev_lock.txt
deactivate