python.pkgs.pythonNamespacesHook: check parent directory exists before removing child

main
Jonathan Ringer 3 years ago committed by Jonathan Ringer
parent f56f3f7dcc
commit ae418d54d3
  1. 7
      pkgs/development/interpreters/python/hooks/python-namespaces-hook.sh

@ -25,7 +25,12 @@ pythonNamespacesHook() {
fi
# remove ${pname}-${version}-${python-interpeter}-nspkg.pth
if [ -z ${dontRemovePth-} ]; then
#
# Still need to check that parent directory exists in the
# event of a "meta-package" package, which will just install
# other packages, but not produce anything in site-packages
# besides meta information
if [ -d "${constructedPath}/../" -a -z ${dontRemovePth-} ]; then
# .pth files are located in the parent directory of a module
@findutils@/bin/find ${constructedPath}/../ -name '*-nspkg.pth' -exec rm -v "{}" +
fi

Loading…
Cancel
Save