scripts/uninstall-debugclients.py

branch
eric7
changeset 10091
ac6edcfe7831
parent 9694
90a7081e2837
child 10300
60e8f2175b3b
--- a/scripts/uninstall-debugclients.py	Thu Jun 15 19:13:51 2023 +0200
+++ b/scripts/uninstall-debugclients.py	Tue Jun 20 11:11:35 2023 +0200
@@ -66,6 +66,15 @@
     global modDir, pyModDir
 
     modDir = sysconfig.get_path("platlib")
+    if not os.access(modDir, os.W_OK):
+        # can't write to the standard path, use the 'user' path instead
+        if sys.platform.startswith(("win", "cygwin")):
+            scheme = "nt_user"
+        elif sys.platform == "darwin":
+            scheme = "osx_framework_user"
+        else:
+            scheme = "posix_user"
+        modDir = sysconfig.get_path("platlib", scheme)
     pyModDir = modDir
 
 

eric ide

mercurial