You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the pyproject.toml, the setup is properly configured like this:
[tool.hatch.build]
packages = [
"/packages/a/src/mypkg",
"/packages/b/src/mypkg",
"/packages/c/src/mypkg",
# more packages here
]
Behavior Observed
Normal Build: When performing a standard build, the site-packages directory correctly includes all Python files as expected. Editable Install: During an editable install, the .pth file only contains the last entry from the package list. This means not all source directories are mapped correctly.
Likely Cause
The issue seems to originate from this section of the Hatch codebase:
The current implementation creates a dictionary mapping top-level package names to a path. This results in a 1-to-1 relationship, where only the last entry for a given top-level package is retained.
Suggested Fix
Instead of mapping top-level packages to paths, the relationship should be inverted: map paths to top-level packages. This change would ensure all relevant paths are included in the .pth file.
The text was updated successfully, but these errors were encountered:
I found that not all package source directories are included in the .pth file during an editable install.
Project Setup
Here’s how my project is structured:
In the pyproject.toml, the setup is properly configured like this:
Behavior Observed
Normal Build: When performing a standard build, the site-packages directory correctly includes all Python files as expected.
Editable Install: During an editable install, the .pth file only contains the last entry from the package list. This means not all source directories are mapped correctly.
Likely Cause
The issue seems to originate from this section of the Hatch codebase:
hatch/backend/src/hatchling/builders/wheel.py
Line 546 in 64031c1
Here’s the key problem:
The current implementation creates a dictionary mapping top-level package names to a path. This results in a 1-to-1 relationship, where only the last entry for a given top-level package is retained.
Suggested Fix
Instead of mapping top-level packages to paths, the relationship should be inverted: map paths to top-level packages. This change would ensure all relevant paths are included in the .pth file.
The text was updated successfully, but these errors were encountered: