about summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
authorJonathan Ringer <jonringer117@gmail.com>2021-11-29 13:51:20 -0800
committerJonathan Ringer <jonringer@users.noreply.github.com>2021-11-29 22:50:15 -0800
commita06fe88f7566eddd66535be81a6fa57308430c13 (patch)
tree3f8691baa7b5220cfb3ae6bb4820c18d0022fae1 /pkgs/development
parent5a8da1a930e6cf724431b9c8b1f82b99d670914c (diff)
python/pythonNamespacesSetupHook: add to addtional files to remove
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/interpreters/python/hooks/python-namespaces-hook.sh6
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