core/pkgs/by-name/py/python/hooks/python-remove-tests-dir-hook.sh

16 lines
417 B
Bash
Raw Normal View History

2024-05-02 00:46:19 +00:00
# Clean up top-level tests directory in site-package installation.
echo "Sourcing python-remove-tests-dir-hook"
pythonRemoveTestsDir() {
echo "Executing pythonRemoveTestsDir"
rm -rf $out/@pythonSitePackages@/tests
rm -rf $out/@pythonSitePackages@/test
echo "Finished executing pythonRemoveTestsDir"
}
if [ -z "${dontUsePythonRemoveTestsDir-}" ]; then
postFixupHooks+=(pythonRemoveTestsDir)
fi