Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
dmitry-kabanov opened this issue Apr 3, 2025 · 1 comment

Comments

@dmitry-kabanov
Copy link

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?

@LecrisUT
Copy link
Collaborator

LecrisUT commented Apr 3, 2025

I believe we do not support namespace package in editable mode. #808 is trying to address part of it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants