Open sbaer opened 3 years ago
Todo: investigate pyinstaller to make self contained apps that yak could distribute
Check this one out. If GHA is just a .net assembly then this might be the way to go. Supposedly, it packages the interpreter as a .net assembly and it doesn't matter if you have Python installation or not. Alas, it works just with Python 3.7.
Is there any update on this issue recently? It would be great if we can publish a python server as gha and then distribute libraries and customized ghpython components using the cython lib.
Hey @sbaer, Any updates on making it possible to publish CPython-based Grasshopper plugins as .gha?
The only way I found so far is the "Ladybug way", which seems a bit complicated as they:
C:\Users\Name.Surname\ladybug_tools
.pip install lbt-dragonfly
(GitHub): the core Python libraries (lbt-dragonfly
depends on e.g. lbt-ladybug
, which is a collection of all Ladybug Python packages, such as ladybug-core
).C:\Users\Name.Surname\ladybug_tools\python
.C:\Users\Name.Surname\AppData\Roaming\Grasshopper\UserObjects\<library>-grasshopper
.pip install ladybug-grasshopper-dotnet
(GitHub): this installs the the Ladybug.Grasshopper.gha
Grasshopper plugin and Ladybug.Executor.exe
in C:\Users\Name.Surname\AppData\Roaming\Grasshopper\Libraries\ladybug_grasshopper_dotnet
.This would require me to maintain at least 4 code repos:
my-plugin-rhino
, communication between my Python 3.7 installation and Rhino's IronPython 2.7, see 3. & 4.my-plugin-grasshopper
: User Objectsmy-plugin-grasshopper-dotnet
: the .ghaThis request seems a little bit different than the focus of this issue which is to allow ghhops-server instances to become self-contained. CPython support is now in Grasshopper for Rhino 8. I don't believe CPython scripts can be compiled into GHAs yet, but best to ask on https://discourse.mcneel.com/
Provide a tool to take a python server and hops code to create a compiled GHA along with supporting python code. The goal would be to make easy to share yak packages with a python backend server that works on users computers who may not even have python installed.