Skip to content

Commit

Permalink
fix(pythonpath): Add additional packages needed for plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
chriswmackey authored and Chris Mackey committed Oct 30, 2023
1 parent ed91e7e commit ce9a1b9
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions ladybug_rhino/pythonpath.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@
# core library packages, which get copied or cleaned out of the Rhino scripts folder
PACKAGES = (
'ladybug_rhino', 'ladybug_geometry', 'ladybug_geometry_polyskel',
'ladybug', 'ladybug_comfort', 'honeybee', 'honeybee_standards', 'honeybee_energy',
'honeybee_radiance', 'honeybee_radiance_folder', 'honeybee_radiance_command',
'ladybug', 'ladybug_display', 'ladybug_radiance', 'ladybug_comfort',
'honeybee', 'honeybee_standards', 'honeybee_display', 'honeybee_energy',
'honeybee_radiance', 'honeybee_radiance_folder',
'honeybee_radiance_command', 'honeybee_radiance_postprocess',
'dragonfly', 'dragonfly_energy', 'dragonfly_radiance', 'dragonfly_uwg',
'lbt_recipes', 'pollination_handlers'
)
Expand All @@ -31,8 +33,13 @@ def create_python_package_dir():
method will create the folder.
"""
py_install = os.path.join(lb_folders.ladybug_tools_folder, 'python')
py_path = os.path.join(py_install, 'Lib', 'site-packages') if os.name == 'nt' \
else os.path.join(py_install, 'lib', 'python3.7', 'site-packages')
if os.name == 'nt':
py_path = os.path.join(py_install, 'Lib', 'site-packages')
else:
py_ver = 'python3.7' \
if os.path.isdir(os.path.join(py_install, 'lib', 'python3.7')) \
else 'python3.10'
py_path = os.path.join(py_install, 'lib', py_ver, 'site-packages')
if not os.path.isdir(py_path):
return os.makedirs(py_path)
return py_path
Expand Down

0 comments on commit ce9a1b9

Please sign in to comment.