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