Skip to content

Import issues in editable install when using complicated wheel.packages options #1040

Open
@dmitry-kabanov

Description

@dmitry-kabanov

I have a problem with imports when using an editable installation versus a normal installation (this one does not have issues).

The project has a complicated structure and uses namespace packages (keeps different subpackages in different paths, but they logically form a single package when using import in Python).

During the build, the subpackages are brought from different places together:

[tool.scikit-build.wheel.packages]
"oif" = "oif/lang_python/oif"
"oif/examples" = "examples"
"oif/interfaces" = "oif/interfaces/python/oif/interfaces"
"oif/_impl" = "oif_impl/_impl"
"oif/_impl/interfaces" = "oif_impl/lang_python/oif/_impl/interfaces"

and after pip install ....tar.gz, everything works: I can do, e.g., from oif._impl import ....

However, to develop the package further I need an editable install, and it does not work somehow.
I also see that the installed .pth file does not help any how because it does not take into an account the restructuring of directories during the build step.

Is it a normal behavior?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions