Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/poetry export fox nested deps #15

Merged
merged 2 commits into from
Oct 9, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion bin/compile
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,20 @@ function indent() {
echo "-----> Generate requirements.txt with Poetry"

echo "-----> Install Poetry"
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python | indent

curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py \
| sed -e 's/allowed_executables = \["python", "python3"\]/allowed_executables = ["python3"]/' \
| python3 \
| indent

source $HOME/.poetry/env

# ToDo: remove this hack when Poetry 1.1.3 is released. Fix in https://github.com/python-poetry/poetry/pull/3119
if [ "$POETRY_VERSION" = "1.1.2" ]; then
echo "-----> Patch Poetry export file"
sed -i '234s/deepcopy(requirement)/deepcopy(__get_locked_package(requirement).to_dependency())/' $HOME/.poetry/lib/poetry/packages/locker.py
fi

echo "-----> Export requirements.txt from Poetry"

cd "$BUILD_DIR"
Expand Down