Incorporating custom library/modules in a compiled rhino python plugin

Hi,
I’m working on a Rhino Python plugin and I’ve made some modules that are called by the individual command scripts. I have two questions about how to cleanly work with these modules.

First: From a user perspective, is there a way to compile these modules to ease installation? Let’s say the modules are in directory “plugin-lib”.
Currently I have the user download the .rhi, a powershell script, and “plugin-lib”. Then they install the commands with the .rhi and run a Powershell script that moves “plugin-lib” into their Rhino/scripts directory… Can this be made simpler? I suspect at the compilation step, some way to compile with the modules?

Second: from a development standpoint, I want to allow a developer to clone a repo to Rhino/scripts/ and edit the commands and/or the modules, then compile easily. I am trying to game out the workflow for working with the module imports. When developing, you could manually change the import path for the modules to go to Rhino/scripts/plugin-repo/plugin-lib, but then you have to manually change the paths back to Rhino/scripts/plugin-lib every time you want to deploy the thing. Is there a way to avoid this manual step?

Let me know if more information’s needed – still learning this stuff.

1 Like