@@ -40,9 +40,13 @@ def uninstall(version=None, packages=None):
4040 """
4141 version = compas_rhino ._check_rhino_version (version )
4242
43- # We install COMPAS packages in the scripts folder
44- # instead of directly as IPy module.
45- scripts_path = compas_rhino ._get_rhino_scripts_path (version )
43+ if version == "8.0" :
44+ # In Rhino 8 there is no scripts folder
45+ installation_path = compas_rhino ._get_default_rhino_ironpython_sitepackages_path (version )
46+ else :
47+ # We install COMPAS packages in the scripts folder
48+ # instead of directly as IPy module.
49+ installation_path = compas_rhino ._get_rhino_scripts_path (version )
4650
4751 # This is for old installs
4852 ipylib_path = compas_rhino ._get_rhino_ironpython_lib_path (version )
@@ -54,8 +58,8 @@ def uninstall(version=None, packages=None):
5458
5559 # Also remove all broken symlinks
5660 # because ... they're broken!
57- for name in os .listdir (scripts_path ):
58- path = os .path .join (scripts_path , name )
61+ for name in os .listdir (installation_path ):
62+ path = os .path .join (installation_path , name )
5963 if os .path .islink (path ):
6064 if not os .path .exists (path ):
6165 if name not in packages :
@@ -65,7 +69,7 @@ def uninstall(version=None, packages=None):
6569 symlinks_to_uninstall = []
6670
6771 for package in packages :
68- symlink_path = os .path .join (scripts_path , package )
72+ symlink_path = os .path .join (installation_path , package )
6973 symlinks_to_uninstall .append (dict (name = package , link = symlink_path ))
7074
7175 # Handle legacy install location
@@ -113,7 +117,7 @@ def uninstall(version=None, packages=None):
113117 )
114118
115119 else :
116- if compas_rhino ._try_remove_bootstrapper (scripts_path ):
120+ if compas_rhino ._try_remove_bootstrapper (installation_path ):
117121 results .append (("compas_bootstrapper" , "OK" ))
118122 else :
119123 results .append (
@@ -138,7 +142,7 @@ def uninstall(version=None, packages=None):
138142 # Output results
139143 # -------------------------
140144
141- print ("Uninstalling COMPAS packages from Rhino {0} scripts folder: \n {1}" .format (version , scripts_path ))
145+ print ("Uninstalling COMPAS packages from Rhino {0} scripts folder: \n {1}" .format (version , installation_path ))
142146 print ("\n The following packages have been detected and will be uninstalled:\n " )
143147
144148 for package , status in results :
0 commit comments