Hubs-Foundation / hubs-blender-exporter

The Hubs Blender Add-on enables artists to export their creations to the immersive web with Hubs
Mozilla Public License 2.0
165 stars 51 forks source link

Isolate dependencies from other add-ons #284

Closed keianhzo closed 1 month ago

keianhzo commented 1 month ago

This PR isolates selenium from the Blender python packages to avoid conflicts. We still do it using pip but using a specific target directory and now the modules are loaded in isolation using importlib.

Exairnous commented 1 month ago

Oh, also, I think this will leave the old selenium module installed. It would be nice to remove it, if that's not too hard.

keianhzo commented 1 month ago

Oh, also, I think this will leave the old selenium module installed. It would be nice to remove it, if that's not too hard.

Yeah that's a problem with the way we were doing things before we can't really remove it as we don't know if any other add-on might have installed or is using it.

Exairnous commented 1 month ago

Thank you for the updates.

Yeah that's a problem with the way we were doing things before we can't really remove it as we don't know if any other add-on might have installed or is using it.

Good point. That makes sense.

Any update on my questions from above?

Why have the install/uninstall deps operators been changed to only work with a single module? Why did you create a dependencies folder with an init.py instead of just creating dependencies.py? Why has the check to ensure pip is present been removed from the install deps operator?

keianhzo commented 1 month ago

Why have the install/uninstall deps operators been changed to only work with a single module?

We were only using these operators to install one dependency so I simplified the code to just get one dep.

Why did you create a dependencies folder with an init.py instead of just creating dependencies.py?

No strong reason, I guess it makes it simple to do from .dependencies import get_XXX

Why has the check to ensure pip is present been removed from the install deps operator?

I think we can safely assume that pip is always present in Blender installs

keianhzo commented 1 month ago

I've addressed the feedback and added back pip and added pip upgrade.