-
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 run pip install . doesn't work with directory dependencies #3818
Comments
I tried changing my relative path reference to an absolute one and I ran into this error:
So this got me past the issue internal to poetry which would appear to be the result of some path mishandling. This issue is now internal to pip, but some logging reveals that poetry is passing pip a requirement string of the form
Which isn't valid. Same root cause as the issue fixed by this PR #3121 , but this issue is actually in core. |
So, there's two issues here. The issue mentioned in my comment above about absolute path dependencues is fixed by python-poetry/poetry-core#141. The other part of this, relative paths, is actually an issue with how pip handles PEP 517 builds. I've filed and issue with them pypa/pip#9716 TL;DR on that: pip moves your package into a temp directory before invoking the build backend and doesn't tell you where you came from. As a result, you can't resolve a relative path because you have no context on what it is actually relative to. |
Hello @AndrewGuenther, as you figured out, the issue with the absolute path is already solved. This issue with relative path exists, because there is no definition what "relative" is exactly. Relative to the path where Path dependencies are fine for testing or if you have checked out the whole project and install it in editable mode. If you want to provide a "real" package (sdist, wheel) avoid path dependencies. I think it's fine to close this issue as one part is already solve and the other cannot be solved? fin swimmer |
I don't think this is quite resolved. My PR resolves part of it, but still won't work for relative paths. Pip rejected my issue saying that is non-standard. Should poetry have clear messaging when invoked via PEP 517 builds that it will fail due to a relative path? I'd imaging an error both on that path and |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
If an exception occurs when executing a command, I executed it again in debug mode (-vvv
option).No verbose output because
-v
is currently broken: #3751Issue
When I try to run
poetry run pip install .
for my poetry package, it breaks if I have a directory dependency with the following error:../../lib/my-project-lib
does exist, and my package can build just fine when runningpoetry build
. Executingpoetry run pip install ../../lib/my-project-lib
orpoetry add ../../lib/my-project-lib
also work. Seems like there's some local dependency resolution issues happening specifically when poetry is invoked by pip.The text was updated successfully, but these errors were encountered: