scripts/uninstall.py

branch
eric7
changeset 10091
ac6edcfe7831
parent 10084
125166c6b66c
child 10101
34f74c19ed7a
child 10261
fa560567d555
--- a/scripts/uninstall.py	Thu Jun 15 19:13:51 2023 +0200
+++ b/scripts/uninstall.py	Tue Jun 20 11:11:35 2023 +0200
@@ -89,6 +89,15 @@
     global pyModDir
 
     pyModDir = sysconfig.get_path("platlib")
+    if not os.access(pyModDir, 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"
+        pyModDir = sysconfig.get_path("platlib", scheme)
 
 
 def wrapperNames(dname, wfile):

eric ide

mercurial