python.pkgs.pythonNamespacesHook: check parent directory exists before removing child
This commit is contained in:
parent
f56f3f7dcc
commit
ae418d54d3
@ -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…
Reference in New Issue
Block a user