compas-dev / compas-dev/compas
Vendoring compas inside another Rhino/Grasshopper package pulls in compas_ghpython's .ghuser components (stray broken COMPAS tab)
- Dominant language
- Python
- Stars
- 386
- Forks
- 122
- Avg merge
- 11d 46m
- Merged PRs (30d)
- 1
Description
## 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.
Contributor guide
Assessment
This issue has not been assessed yet.