-
-
Notifications
You must be signed in to change notification settings - Fork 258
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
Failed to resolve compatible distributions when building Pex from .whl with local dependencies #2038
Comments
@rajaie-sg can you provide a link to your repository or is it closed source? That would be the easiest path to a repro here. |
Ok, I built a repro. This is a bug. |
@rajaie-sg I have a fix over in #2041 and the test added there is instructive. If you have anything more complex than the toy case you outlined (I.E.: If you have many Poetry projects with complex or at least >1 level deep interdependencies), you'll need to add |
This has been a very long standing bug. The root issue is that `pip download`, although it processes these deps and fails if not present on the local filesystem, only handles resolving recursive dependencies and it does not "download" the local distribution from its referenced path on the file system to the `pip download` download dir. As such, the normal Pex post-processing is foiled for these deps. The fix provided here is in common infra used by both normal Pex builds and `--lock` builds and uses a recursive post-processing step that gathers all such dependencies from the downloaded distributions and injects them into the normal Pex post-processing chain. Fixes #2038
@jsirois - I confirmed that upgrading to 2.1.121 fixed the toy case I shared in my original post. We do have Poetry projects with multi-level local dependencies, where ABC.whl depends on the library at local path XYZ, which depends on the library at local path FOO When I run Here's the log when I add
When I Ctrl+C out of the process, I get this trace:
I am on pex This is how the METADATA for
The The dependencies section for
FYI I am running the pex command as root (to rule out any permission issues) |
You can ignore the comment above, I think I was doing something wrong on my end. I was able to get it working with the |
I have a
pyproject.toml
file as below at~/code/mylibrary/
:I build a .whl for
mylibrary
and here's what itsmylibrary-0.1.0.dist-info/METADATA
file contains:I am trying to build a Pex file by passing that .whl as a dependency, but I am getting the error below:
Is this a bug in Pex, or is this kind of dependency specification not supported?
I'm able to run
pip install mylibrary-0.1.0-py3-none-any.whl
in a clean virtual environment as long asfile:///Users/rajaiealkorani/code/anotherlibrary
existsI am using Pex
2.1.120
The text was updated successfully, but these errors were encountered: