-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Package dependency is not installed from local checkout #11351
Comments
Sorry, can you create a minimal reproduction that we can use to debug your issue? Ideally, a Git repo or a zip archive or similar that we can download, along with the exact command you ran, what you expected to see, and what you saw in practice. |
Sorry, I thought the question was clear enough and there is an easy explanation. |
Thanks! We'll take a look. |
Hmm ok. The issue here is that |
Thanks for looking into it! But isn't it weird that it works with a git source but not with the local checkout? |
Thank you so much for taking the time to make a complete reproduction. We have different logic for remote sources (like Git) and local sources (like a directory). @charliermarsh it seems wrong to treat this as a virtual project since it's a dependency? Shouldn't virtual projects only be allowed at the root of a workspace? Or, at the very least, as a workspace member? As an example, wouldn't the behavior be weird here with |
No, we allow any path dependency to be virtual. |
(We can change that, but it appears to be intentional in the code and would be breaking.) |
(At minimum, it seems like we need to allow |
@zanieb -- Should we change this for |
Issue summary
I defined a dependency using a local path as source.
However, the package is not installed after syncing.
The same package can be installed from the git repo without a problem.
Reproducible steps
(The section below shows the steps in a Dockerfile and its output)
pyproject.toml
inside it/tmp
foldergit clone https://github.com/xsuite/xobjects /tmp/xobjects
Run
uv sync -U -v
. Result: (https://pastebin.com/Zxrt0UiA).I expected the package to be installed. But uv installed only it's dependencies.
Check with
uv pip show xobjects
-> Package not foundWhat I tried to check any issues with this particular package
Use git source instead:
Change the source in pyproject to be:
xobjects = { git = "https://github.com/xsuite/xobjects" }
Re-run
uv sync -U -v
Result (as expected): The
xobjects
package is installed.Install it directly:
uv pip install /tmp/xobjects/
xobjects
package is installed. (uv pip show xobjects
)After manual installation (and with the local path in
pyproject.toml
), sync again, to see if the package is kept in the environmentuv sync -U -v
Dockerfile
You can find a Dockerfile with the above steps here: (https://pastebin.com/jNwH4HZL)
The output can be found here: (https://pastebin.com/M7vLMGR0)
Platform
Ubuntu 24.04, linux x86_64
Version
0.5.29
The text was updated successfully, but these errors were encountered: