mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-20 12:43:52 +00:00
12f9d8e730
Before packages did not had to set `format = "other";` if had a custom installPhase and would not produce a dist folder. The current error message is hard to understand by new users: > Executing pythonOutputDistPhase > mv: cannot stat 'dist': No such file or directory This commit improves the error message.
25 lines
669 B
Bash
25 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"
|