Skip to content

Vendoring compas inside another Rhino/Grasshopper package pulls in compas_ghpython's .ghuser components (stray broken COMPAS tab) #1523

Description

@mengxihex

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions