core/pkgs/by-name/py/python/hooks/python-output-dist-hook.sh

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

25 lines
669 B
Bash
Raw Normal View History

2024-05-02 00:46:19 +00:00
# Setup hook for storing dist folder (wheels/sdists) in a separate output
echo "Sourcing python-catch-conflicts-hook.sh"
pythonOutputDistPhase() {
echo "Executing pythonOutputDistPhase"
if [[ -d dist ]]; then
mv "dist" "$dist"
else
cat >&2 <<EOF
The build contains no ./dist directory.
If this project is not setuptools-based, pass
format = "other";
to buildPythonApplication/buildPythonPackage or another appropriate value as described here:
https://nixos.org/manual/nixpkgs/stable/#buildpythonpackage-function
EOF
false
fi
echo "Finished executing pythonOutputDistPhase"
}
preFixupPhases+=" pythonOutputDistPhase"