There was an error while loading. Please reload this page.
1 parent e14c7aa commit 908f6e3Copy full SHA for 908f6e3
1 file changed
make-poetry-conversion-patch.sh
@@ -7,6 +7,8 @@
7
GENERATED_POETRY_FILES=(pyproject.toml poetry.lock)
8
PATCH_FILE=poetry-conversion.patch
9
10
+set -e
11
+
12
# Sanity check.
13
for f in "${GENERATED_POETRY_FILES[@]}" ; do
14
test -f "$f" && { echo "File $f exists! Aborting ..." ; exit 1; }
@@ -47,8 +49,7 @@ EOF
47
49
48
50
# Convert requirements.txt entries to pyproject.toml entries.
51
# https://github.com/python-poetry/poetry/issues/663
-# This may take very long.
-perl -pe 's/([<=>]+)/:$1/' requirements.txt | xargs -t -n 1 -I {} poetry add '{}'
52
+perl -pe 's/([<=>]+)/:$1/' requirements.txt | tr '\n' ' ' | xargs -t -I {} bash -c "poetry add {}"
53
54
# Generate the patch file.
55
rm $PATCH_FILE
0 commit comments