Skip to content

Commit

Permalink
readability
Browse files Browse the repository at this point in the history
  • Loading branch information
chenkasirer committed Aug 14, 2024
1 parent 9cd6383 commit 681d488
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions src/compas_rhino/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,7 @@ def _make_specs(packages, clean, versions):
for version in versions:
try:
if version == "8.0":
ipy_lib_path = compas_rhino._get_default_rhino_ironpython_sitepackages_path(version, legacy=False)
ipy_lib_path_legacy = compas_rhino._get_default_rhino_ironpython_sitepackages_path(version, legacy=True)
cpython_lib_path = compas_rhino._get_default_rhino_cpython_sitepackages_path(version)
specs.append((ipy_lib_path, version, packages, clean))
specs.append((ipy_lib_path_legacy, version, packages, clean))
specs.append((cpython_lib_path, version, packages, clean))
specs.extend(_make_rhino8_cpython_specs(packages, clean))
else:
path = compas_rhino._get_rhino_scripts_path(version)
specs.append((path, version, packages, clean))
Expand All @@ -41,6 +36,17 @@ def _make_specs(packages, clean, versions):
return specs


def _make_rhino8_cpython_specs(packages, clean):
ipy_lib_path = compas_rhino._get_default_rhino_ironpython_sitepackages_path("8.0", legacy=False)
ipy_lib_path_legacy = compas_rhino._get_default_rhino_ironpython_sitepackages_path("8.0", legacy=True)
cpython_lib_path = compas_rhino._get_default_rhino_cpython_sitepackages_path("8.0")
return [
(ipy_lib_path, "8.0", packages, clean),
(ipy_lib_path_legacy, "8.0", packages, clean),
(cpython_lib_path, "8.0", packages, clean),
]


def _install(installation_path, version=None, packages=None, clean=False):
"""Install COMPAS for Rhino.
Expand Down

0 comments on commit 681d488

Please sign in to comment.