mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 13:03:29 +00:00
The commit is composed of: (1) distill out top-level dependencies in common.txt, (2) add -e flag to the vcs-based packages because pip-compile can't do without, (3) pip-compile/generate the locked files then remove the -e flags from the lockfile, (4) pin pathlib2 to dev.txt because it turns out it is a direct requirement of documentation_crawler, (5) document the structure and add an automation script (6) remove cryptography==1.9 from requirements/scrapy.txt since cryptography is automatically added from pyopenssl (7) add sed command to remove future/futures from the generated lock file in python3 (this should have been automatically handled by pip-compile, so pending for the feature from pip-compile) Tweaked by tabbott to update PROVISION_VERSION and add a missing `first` dependency.
26 lines
995 B
Bash
Executable File
26 lines
995 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -e
|
|
|
|
# Check if zulip-.*venv in particular has been installed
|
|
# It is sufficient to check just for /srv/zulip-py3-venv because it must be
|
|
# present in both cases of py2 and py3
|
|
if [ ! -d /srv/zulip-py3-venv ]; then
|
|
./tools/setup/setup_venvs.py
|
|
fi
|
|
|
|
source /srv/zulip-venv/bin/activate # Activate python2 virtualenv
|
|
pip-compile --output-file requirements/py2_common_lock.txt requirements/py2_common.txt
|
|
# Remove the editable flag in the lock file for safer build
|
|
sed -i 's/-e //' requirements/py2_common_lock.txt
|
|
deactivate
|
|
|
|
source /srv/zulip-py3-venv/bin/activate # Activate python3 virtualenv
|
|
pip-compile --output-file requirements/py3_common_lock.txt requirements/py3_common.txt
|
|
# Remove the editable flag in the lock file for safer build
|
|
sed -i 's/-e //' requirements/py3_common_lock.txt
|
|
# pip-tools bug; future, futures are obsolete in python3
|
|
sed -i '/futures==/d' requirements/py3_common_lock.txt
|
|
sed -i '/future==/d' requirements/py3_common_lock.txt
|
|
|
|
deactivate
|