Skip to content

Commit 906ab34

Browse files
committed
Use nix-shell in make-poetry-conversion-patch.sh
1 parent ca92d93 commit 906ab34

2 files changed

Lines changed: 53 additions & 9 deletions

File tree

make-poetry-conversion-patch.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
#!/usr/bin/env bash
1+
#!/usr/bin/env nix-shell
2+
#!nix-shell -i bash -p diffutils libxml2 libxslt perl poetry
23

34
# This script is used to update ./poetry-conversion.patch. Applying the patch
45
# will to convert this folder into a Poetry project.
@@ -52,7 +53,7 @@ perl -pe 's/([<=>]+)/:$1/' requirements.txt | xargs -t -n 1 -I {} poetry add '{}
5253
# Generate the patch file.
5354
rm $PATCH_FILE
5455
for f in "${GENERATED_POETRY_FILES[@]}" ; do
55-
diff -u /dev/null "$f" >> $PATCH_FILE
56+
diff -u /dev/null "$f" >> $PATCH_FILE || true # we expect differences
5657
done
5758

5859
# Remove poetry files again.

poetry-conversion.patch

Lines changed: 50 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
--- /dev/null 2020-10-28 07:13:10.842256877 +0100
2-
+++ pyproject.toml 2020-10-28 15:19:24.040375941 +0100
3-
@@ -0,0 +1,71 @@
1+
--- /dev/null 2020-11-01 20:43:42.902469240 +0100
2+
+++ pyproject.toml 2020-11-01 22:30:24.882222098 +0100
3+
@@ -0,0 +1,72 @@
44
+[tool.poetry]
55
+name = "vulnerablecode"
66
+version = "20.10"
@@ -31,6 +31,7 @@
3131
+ipython = "==7.13.0"
3232
+ipython-genutils = "==0.2.0"
3333
+jedi = "==0.17.0"
34+
+lxml = "==4.3.3"
3435
+more-itertools = "==8.0.2"
3536
+packageurl-python = "==0.9.1"
3637
+packaging = "==19.2"
@@ -72,9 +73,9 @@
7273
+[build-system]
7374
+requires = ["poetry>=0.12"]
7475
+build-backend = "poetry.masonry.api"
75-
--- /dev/null 2020-10-28 07:13:10.842256877 +0100
76-
+++ poetry.lock 2020-10-28 15:19:25.232377410 +0100
77-
@@ -0,0 +1,1296 @@
76+
--- /dev/null 2020-11-01 20:43:42.902469240 +0100
77+
+++ poetry.lock 2020-11-01 22:30:26.074218883 +0100
78+
@@ -0,0 +1,1338 @@
7879
+[[package]]
7980
+category = "main"
8081
+description = "Async http client/server framework (asyncio)"
@@ -458,6 +459,20 @@
458459
+
459460
+[[package]]
460461
+category = "main"
462+
+description = "Powerful and Pythonic XML processing library combining libxml2/libxslt with the ElementTree API."
463+
+name = "lxml"
464+
+optional = false
465+
+python-versions = "*"
466+
+version = "4.3.3"
467+
+
468+
+[package.extras]
469+
+cssselect = ["cssselect (>=0.7)"]
470+
+html5 = ["html5lib"]
471+
+htmlsoup = ["beautifulsoup4"]
472+
+source = ["Cython (>=0.29.1)"]
473+
+
474+
+[[package]]
475+
+category = "main"
461476
+description = "Safely add untrusted strings to HTML/XML markup."
462477
+name = "markupsafe"
463478
+optional = false
@@ -901,7 +916,7 @@
901916
+testing = ["pathlib2", "contextlib2", "unittest2"]
902917
+
903918
+[metadata]
904-
+content-hash = "8edf4138436bdf75e58012b29e8f0692b665848e878b7a7c054092f0f5f87201"
919+
+content-hash = "d6430f8d0575b32e6aa42958783598b4ec4008e43da2c8e57694cdd2d40465ff"
905920
+lock-version = "1.0"
906921
+python-versions = "^3.8"
907922
+
@@ -1075,6 +1090,34 @@
10751090
+ {file = "Jinja2-2.11.2-py2.py3-none-any.whl", hash = "sha256:f0a4641d3cf955324a89c04f3d94663aa4d638abe8f733ecd3582848e1c37035"},
10761091
+ {file = "Jinja2-2.11.2.tar.gz", hash = "sha256:89aab215427ef59c34ad58735269eb58b1a5808103067f7bb9d5836c651b3bb0"},
10771092
+]
1093+
+lxml = [
1094+
+ {file = "lxml-4.3.3-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl", hash = "sha256:3210da6f36cf4b835ff1be853962b22cc354d506f493b67a4303c88bbb40d57b"},
1095+
+ {file = "lxml-4.3.3-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:fdcb57b906dbc1f80666e6290e794ab8fb959a2e17aa5aee1758a85d1da4533f"},
1096+
+ {file = "lxml-4.3.3-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:a3080470559938a09a5d0ec558c005282e99ac77bf8211fb7b9a5c66390acd8d"},
1097+
+ {file = "lxml-4.3.3-cp27-cp27m-win32.whl", hash = "sha256:bdb0593a42070b0a5f138b79b872289ee73c8e25b3f0bea6564e795b55b6bcdd"},
1098+
+ {file = "lxml-4.3.3-cp27-cp27m-win_amd64.whl", hash = "sha256:b4fbf9b552faff54742bcd0791ab1da5863363fb19047e68f6592be1ac2dab33"},
1099+
+ {file = "lxml-4.3.3-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:62f382cddf3d2e52cf266e161aa522d54fd624b8cc567bc18f573d9d50d40e8e"},
1100+
+ {file = "lxml-4.3.3-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:ad841b78a476623955da270ab8d207c3c694aa5eba71f4792f65926dc46c6ee8"},
1101+
+ {file = "lxml-4.3.3-cp34-cp34m-manylinux1_i686.whl", hash = "sha256:40f60819fbd5bad6e191ba1329bfafa09ab7f3f174b3d034d413ef5266963294"},
1102+
+ {file = "lxml-4.3.3-cp34-cp34m-manylinux1_x86_64.whl", hash = "sha256:f679d93dec7f7210575c85379a31322df4c46496f184ef650d3aba1484b38a2d"},
1103+
+ {file = "lxml-4.3.3-cp34-cp34m-win32.whl", hash = "sha256:c4e4bca2bb68ce22320297dfa1a7bf070a5b20bcbaec4ee023f83d2f6e76496f"},
1104+
+ {file = "lxml-4.3.3-cp34-cp34m-win_amd64.whl", hash = "sha256:846a0739e595871041385d86d12af4b6999f921359b38affb99cdd6b54219a8f"},
1105+
+ {file = "lxml-4.3.3-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:ff424b01d090ffe1947ec7432b07f536912e0300458f9a7f48ea217dd8362b86"},
1106+
+ {file = "lxml-4.3.3-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:43b26a865a61549919f8a42e094dfdb62847113cf776d84bd6b60e4e3fc20ea3"},
1107+
+ {file = "lxml-4.3.3-cp35-cp35m-win32.whl", hash = "sha256:fd213bb5166e46974f113c8228daaef1732abc47cb561ce9c4c8eaed4bd3b09b"},
1108+
+ {file = "lxml-4.3.3-cp35-cp35m-win_amd64.whl", hash = "sha256:e83b4b2bf029f5104bc1227dbb7bf5ace6fd8fabaebffcd4f8106fafc69fc45f"},
1109+
+ {file = "lxml-4.3.3-cp36-cp36m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl", hash = "sha256:175f3825f075cf02d15099eb52658457cf0ff103dcf11512b5d2583e1d40f58b"},
1110+
+ {file = "lxml-4.3.3-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:afdd75d9735e44c639ffd6258ce04a2de3b208f148072c02478162d0944d9da3"},
1111+
+ {file = "lxml-4.3.3-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:b91cfe4438c741aeff662d413fd2808ac901cc6229c838236840d11de4586d63"},
1112+
+ {file = "lxml-4.3.3-cp36-cp36m-win32.whl", hash = "sha256:30e14c62d88d1e01a26936ecd1c6e784d4afc9aa002bba4321c5897937112616"},
1113+
+ {file = "lxml-4.3.3-cp36-cp36m-win_amd64.whl", hash = "sha256:0815b0c9f897468de6a386dc15917a0becf48cc92425613aa8bbfc7f0f82951f"},
1114+
+ {file = "lxml-4.3.3-cp37-cp37m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl", hash = "sha256:03984196d00670b2ab14ae0ea83d5cc0cfa4f5a42558afa9ab5fa745995328f5"},
1115+
+ {file = "lxml-4.3.3-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:cec4ab14af9eae8501be3266ff50c3c2aecc017ba1e86c160209bb4f0423df6a"},
1116+
+ {file = "lxml-4.3.3-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:e995b3734a46d41ae60b6097f7c51ba9958648c6d1e0935b7e0ee446ee4abe22"},
1117+
+ {file = "lxml-4.3.3-cp37-cp37m-win32.whl", hash = "sha256:b90c4e32d6ec089d3fa3518436bdf5ce4d902a0787dbd9bb09f37afe8b994317"},
1118+
+ {file = "lxml-4.3.3-cp37-cp37m-win_amd64.whl", hash = "sha256:7b98f0325be8450da70aa4a796c4f06852949fe031878b4aa1d6c417a412f314"},
1119+
+ {file = "lxml-4.3.3.tar.gz", hash = "sha256:4a03dd682f8e35a10234904e0b9508d705ff98cf962c5851ed052e9340df3d90"},
1120+
+]
10781121
+markupsafe = [
10791122
+ {file = "MarkupSafe-1.1.1-cp27-cp27m-macosx_10_6_intel.whl", hash = "sha256:09027a7803a62ca78792ad89403b1b7a73a01c8cb65909cd876f7fcebd79b161"},
10801123
+ {file = "MarkupSafe-1.1.1-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:e249096428b3ae81b08327a63a485ad0878de3fb939049038579ac0ef61e17e7"},

0 commit comments

Comments
 (0)