-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
poetry sync (editable mode) doesn't handle/allow custom *.pth files #10207
Comments
It sounds like you just need to include the file in the wheel
|
As i said: it ends up in the "normal" wheel just fine, but not in the "editable" wheel (which basically only contains the auto-created PROJECT.pth-file and some metadata). In "editable" mode it doesn't call |
PRs are welcome |
current behaviour seems correct to me. All files are not included in editable wheels, I see no reason to make a special case of some? |
Before I (or somebody else) tries to implement support for this it'd be nice to know if it'd be considered (and whether it needs to be hidden behind flags / options).
I think "editable" basically means "can edit the source and don't need to re-install to activate the changes" (but you probably need to restart your program). One can argue that this should mean that the editable wheel doesn't include any of the source files, but: I'd also say that "editable wheels should behave the same as normal wheels" is a reasonable requirement. I see a few ways to go:
As far as I know poetry doesn't really support installing "non-editable" (neither via |
an editable install just means arranging that the path is such that the python code in your project is available. That does not mean copying around other files that happen to have special meaning. IMO what you are doing is non-standard, and I would not expect tools to have special support for it. |
Issue Kind
Brand new capability
Description
The wheel build via
poetry build
includes custom*.pth
files, but they are not installed in editable mode, and there doesn't seem to be an option to enforce this (also couldn't find anything in the source that might do it).Code references for editable wheel build (which is later installed to the virtualenv):
$PROJECT.pth
-file linking the "editable" packages (actually their base directory, i.e. the "src" folder from the source) into the virtualenv (this works for finding*.py
files, but not*.pth
)Impact
I use
*.pth
-files to initialize the environment; this is an application and is always installed in its own virtualenv, so there is no downside, but it makes life much easier.Workarounds
With
hatch
instead of poetry I can install*.pth
-files using[tool.hatch.build.targets.wheel.force-include]
.The text was updated successfully, but these errors were encountered: