depot/third_party/nixpkgs/pkgs/development/interpreters/python/hooks/python-output-dist-hook.sh
Default email 01ed8ef136 Project import generated by Copybara.
GitOrigin-RevId: 20fc948445a6c22d4e8d5178e9a6bc6e1f5417c8
2022-11-21 19:40:18 +02:00

24 lines
669 B
Bash

# 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"