@@ -40,9 +40,13 @@ def uninstall(version=None, packages=None):
40
40
"""
41
41
version = compas_rhino ._check_rhino_version (version )
42
42
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 )
46
50
47
51
# This is for old installs
48
52
ipylib_path = compas_rhino ._get_rhino_ironpython_lib_path (version )
@@ -54,8 +58,8 @@ def uninstall(version=None, packages=None):
54
58
55
59
# Also remove all broken symlinks
56
60
# 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 )
59
63
if os .path .islink (path ):
60
64
if not os .path .exists (path ):
61
65
if name not in packages :
@@ -65,7 +69,7 @@ def uninstall(version=None, packages=None):
65
69
symlinks_to_uninstall = []
66
70
67
71
for package in packages :
68
- symlink_path = os .path .join (scripts_path , package )
72
+ symlink_path = os .path .join (installation_path , package )
69
73
symlinks_to_uninstall .append (dict (name = package , link = symlink_path ))
70
74
71
75
# Handle legacy install location
@@ -78,7 +82,7 @@ def uninstall(version=None, packages=None):
78
82
79
83
# There is nothing to uninstall
80
84
if not symlinks_to_uninstall :
81
- print ("\n No packages to uninstall from Rhino {0} scripts folder: \n {1}." .format (version , scripts_path ))
85
+ print ("\n No packages to uninstall from Rhino {0} scripts folder: \n {1}." .format (version , installation_path ))
82
86
return
83
87
84
88
# -------------------------
@@ -113,7 +117,7 @@ def uninstall(version=None, packages=None):
113
117
)
114
118
115
119
else :
116
- if compas_rhino ._try_remove_bootstrapper (scripts_path ):
120
+ if compas_rhino ._try_remove_bootstrapper (installation_path ):
117
121
results .append (("compas_bootstrapper" , "OK" ))
118
122
else :
119
123
results .append (
@@ -138,7 +142,7 @@ def uninstall(version=None, packages=None):
138
142
# Output results
139
143
# -------------------------
140
144
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 ))
142
146
print ("\n The following packages have been detected and will be uninstalled:\n " )
143
147
144
148
for package , status in results :
0 commit comments