diff options
-rw-r--r-- | pkgs/development/interpreters/python/hooks/python-namespaces-hook.sh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/pkgs/development/interpreters/python/hooks/python-namespaces-hook.sh b/pkgs/development/interpreters/python/hooks/python-namespaces-hook.sh index 15d2bd0eb34c5..12ae50a198123 100644 --- a/pkgs/development/interpreters/python/hooks/python-namespaces-hook.sh +++ b/pkgs/development/interpreters/python/hooks/python-namespaces-hook.sh @@ -24,6 +24,12 @@ pythonNamespacesHook() { rm -v "$pathToRemove" fi + # remove ${pname}-${version}-${python-interpeter}-nspkg.pth + if [ -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 + # remove __pycache__/ entry, can be interpreter specific. E.g. __init__.cpython-38.pyc # use null characters to perserve potential whitespace in filepath if [ -d "$pycachePath" ]; then |