mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 06:53:25 +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 () {
|
compile_requirements () {
|
||||||
source="$1"
|
source="$1"
|
||||||
output="$2"
|
output="$2"
|
||||||
|
python_version="$3"
|
||||||
|
|
||||||
pip-compile --output-file "$output" "$source"
|
pip-compile --output-file "$output" "$source"
|
||||||
|
|
||||||
@@ -19,9 +20,11 @@ compile_requirements () {
|
|||||||
# in the output of pip-compile it's no longer needed.
|
# in the output of pip-compile it's no longer needed.
|
||||||
sed -i 's/-e //' "$output"
|
sed -i 's/-e //' "$output"
|
||||||
|
|
||||||
# pip-tools bug; future, futures are obsolete in python3
|
if [ "$python_version" != "py2" ]; then
|
||||||
sed -i '/futures==/d' "$output"
|
# pip-tools bug; future, futures are obsolete in python3
|
||||||
sed -i '/future==/d' "$output"
|
sed -i '/futures==/d' "$output"
|
||||||
|
sed -i '/future==/d' "$output"
|
||||||
|
fi
|
||||||
|
|
||||||
(
|
(
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
|
|||||||
Reference in New Issue
Block a user