mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 16:14:02 +00:00
update-locked-requirements: Add py2 option to compile requirements.
In this commit we add a new option which could be used to specify python version. When 'py2' is specified, future/futures are not removed from the requirements lock file generated.
This commit is contained in:
committed by
Tim Abbott
parent
79576797b0
commit
66060c703c
@@ -10,6 +10,7 @@ source /srv/zulip-py3-venv/bin/activate
|
||||
compile_requirements () {
|
||||
source="$1"
|
||||
output="$2"
|
||||
python_version="$3"
|
||||
|
||||
pip-compile --output-file "$output" "$source"
|
||||
|
||||
@@ -19,9 +20,11 @@ compile_requirements () {
|
||||
# in the output of pip-compile it's no longer needed.
|
||||
sed -i 's/-e //' "$output"
|
||||
|
||||
# pip-tools bug; future, futures are obsolete in python3
|
||||
sed -i '/futures==/d' "$output"
|
||||
sed -i '/future==/d' "$output"
|
||||
if [ "$python_version" != "py2" ]; then
|
||||
# pip-tools bug; future, futures are obsolete in python3
|
||||
sed -i '/futures==/d' "$output"
|
||||
sed -i '/future==/d' "$output"
|
||||
fi
|
||||
|
||||
(
|
||||
cat <<EOF
|
||||
|
Reference in New Issue
Block a user