1# Setup hook for storing dist folder (wheels/sdists) in a separate output
2echo "Sourcing python-catch-conflicts-hook.sh"
3
4pythonOutputDistPhase() {
5 echo "Executing pythonOutputDistPhase"
6 if [[ -d dist ]]; then
7 mv "dist" "$dist"
8 else
9 cat >&2 <<EOF
10The build contains no ./dist directory.
11If this project is not setuptools-based, pass
12
13 format = "other";
14
15to buildPythonApplication/buildPythonPackage or another appropriate value as described here:
16
17 https://nixos.org/manual/nixpkgs/stable/#buildpythonpackage-function
18EOF
19 false
20 fi
21 echo "Finished executing pythonOutputDistPhase"
22}
23
24preFixupPhases+=" pythonOutputDistPhase"