poetry2nix/hooks/remove-path-dependencies.sh
adisbladis c1b21de0ba
Check if pyproject.toml exists before patching path deps
Local path dependencies may be setuptools projects.
2020-02-28 19:27:33 +00:00

12 lines
384 B
Bash

remove-path-dependencies-hook() {
if ! test -f pyproject.toml; then
return
fi
# Tell poetry not to resolve the path dependencies. Any version is fine!
@yj@ -tj < pyproject.toml | @pythonInterpreter@ @pyprojectPatchScript@ > pyproject.json
@yj@ -jt < pyproject.json > pyproject.toml
rm pyproject.json
}
postPatchHooks+=(remove-path-dependencies-hook)