Describe the problem
The compas wheel ships compas_rhino, compas_ghpython, and compas_blender alongside the core library. We bundle our Grasshopper plugin as a Yak package that vendors its Python dependencies inside the package folder (Rhino 8, CPython 3.9) — and because Grasshopper scans installed package folders recursively for .ghuser files, the five components under compas_ghpython/components/ghuser/ get loaded into every user's ribbon. They then fail with No module named compas_bootstrapper, since the environment was never set up via compas_rhino.install (nor should it be, in this deployment model — core compas works perfectly for us as a plain vendored library).
Our workaround is to strip the three CAD packages from the wheel at build time, which works fine (core compas has no hard imports of them). Raising this in case the use case is worth supporting more directly — e.g. publishing the CAD integrations as extras/separate dists (pip install compas[rhino]), or relocating the prebuilt .ghuser payload so it isn't discovered by Grasshopper's folder scan when the wheel is merely vendored. Happy to provide details of the deployment layout if useful.
Describe the problem
The
compaswheel shipscompas_rhino,compas_ghpython, andcompas_blenderalongside the core library. We bundle our Grasshopper plugin as a Yak package that vendors its Python dependencies inside the package folder (Rhino 8, CPython 3.9) — and because Grasshopper scans installed package folders recursively for.ghuserfiles, the five components undercompas_ghpython/components/ghuser/get loaded into every user's ribbon. They then fail withNo module named compas_bootstrapper, since the environment was never set up viacompas_rhino.install(nor should it be, in this deployment model — corecompasworks perfectly for us as a plain vendored library).Our workaround is to strip the three CAD packages from the wheel at build time, which works fine (core
compashas no hard imports of them). Raising this in case the use case is worth supporting more directly — e.g. publishing the CAD integrations as extras/separate dists (pip install compas[rhino]), or relocating the prebuilt.ghuserpayload so it isn't discovered by Grasshopper's folder scan when the wheel is merely vendored. Happy to provide details of the deployment layout if useful.