Files
nixpkgs/pkgs/development/interpreters/python/hooks/python-remove-tests-dir-hook.sh

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
478 B
Bash
Raw Normal View History

2025-10-09 14:15:47 +02:00
# Clean up top-level tests directory in site-package installation.
# shellcheck shell=bash
echo "Sourcing python-remove-tests-dir-hook"
pythonRemoveTestsDir() {
echo "Executing pythonRemoveTestsDir"
# shellcheck disable=SC2154
rm -rf "$out/@pythonSitePackages@/tests"
rm -rf "$out/@pythonSitePackages@/test"
echo "Finished executing pythonRemoveTestsDir"
}
if [ -z "${dontUsePythonRemoveTestsDir-}" ]; then
postFixupHooks+=(pythonRemoveTestsDir)
fi