mirror of
https://github.com/vale981/poetry2nix
synced 2025-03-05 09:11:39 -05:00

We should not be setting pre/post phases as it's counter intuitive when working with overrides.
18 lines
393 B
Python
18 lines
393 B
Python
#!/usr/bin/env python
|
|
# Patch out path dependencies from a pyproject.json file
|
|
|
|
import json
|
|
import sys
|
|
|
|
data = json.load(sys.stdin)
|
|
|
|
for dep in data['tool']['poetry']['dependencies'].values():
|
|
if isinstance(dep, dict):
|
|
try:
|
|
del dep['path'];
|
|
except KeyError:
|
|
pass
|
|
else:
|
|
dep['version'] = '*'
|
|
|
|
json.dump(data, sys.stdout, indent=4)
|