Commit b1fccf10 authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm restore: add support for modern pyproject

parent 296bbf7e
...@@ -186,12 +186,17 @@ if len(sys.argv) < 2: ...@@ -186,12 +186,17 @@ if len(sys.argv) < 2:
pyproject = sys.argv[1] pyproject = sys.argv[1]
c = toml.load(pyproject) c = toml.load(pyproject)
n = c["tool"]["poetry"]["dependencies"] try:
for key, value in n.items(): n = c["tool"]["poetry"]["dependencies"]
for key, value in n.items():
if isinstance(value, dict): if isinstance(value, dict):
print('\n' + key + ' ' , value["version"]) print('\n' + key + ' ' , value["version"])
else: else:
print('\n' + key + ' ' + value) print('\n' + key + ' ' + value)
except:
n = c["project"]["dependencies"]
for t in n:
print('\n' + t)
EOF EOF
a= python3 $lt "$1" a= python3 $lt "$1"
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment