nixpkgs/pkgs/development/interpreters/python/hooks/setuptools-build-hook.sh
Thomas Watson 26ccdea3d7 python3Packages.setuptoolsBuildHook: delete broken setuptoolsShellHook
Broken since the switch to PyPA's build/installer in
6c85fff302.

The hook was always janky and maintainers appear to not want its current
implementation in-tree. No replacement is currently planned.

However, this leaves the path open for future replacements as a broken
hook will no longer be installed by default.
2024-03-24 19:21:55 -05:00

30 lines
797 B
Bash

# Setup hook for setuptools.
echo "Sourcing setuptools-build-hook"
setuptoolsBuildPhase() {
echo "Executing setuptoolsBuildPhase"
local args
runHook preBuild
cp -f @setuppy@ nix_run_setup
args=""
if [ -n "$setupPyGlobalFlags" ]; then
args+="$setupPyGlobalFlags"
fi
if [ -n "$enableParallelBuilding" ]; then
setupPyBuildFlags+=" --parallel $NIX_BUILD_CORES"
fi
if [ -n "$setupPyBuildFlags" ]; then
args+=" build_ext $setupPyBuildFlags"
fi
eval "@pythonInterpreter@ nix_run_setup $args bdist_wheel"
runHook postBuild
echo "Finished executing setuptoolsBuildPhase"
}
if [ -z "${dontUseSetuptoolsBuild-}" ] && [ -z "${buildPhase-}" ]; then
echo "Using setuptoolsBuildPhase"
buildPhase=setuptoolsBuildPhase
fi