Skip to content
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

Support for editable dependencies with URLs #5442

Closed
krmax44 opened this issue Jul 25, 2024 · 7 comments
Closed

Support for editable dependencies with URLs #5442

krmax44 opened this issue Jul 25, 2024 · 7 comments
Labels
question Asking for clarification or support

Comments

@krmax44
Copy link

krmax44 commented Jul 25, 2024

While uv supports dependencies from URLs (like uv pip install git+https://github.com/pallets/flask.git), they can't be installed with the -e flag:

$ uv pip install -e git+https://github.com/pallets/flask.git
error: Editable must refer to a local directory, not a Git URL

For multi-repo projects, this would be nice to have.

@zanieb
Copy link
Member

zanieb commented Jul 25, 2024

Hi! What does it mean to have an editable installation of a remote git dependency?

@krmax44
Copy link
Author

krmax44 commented Jul 25, 2024

Thanks for your quick reply! From my understanding, there is little difference than with the -e flag omitted. With the -e flag however, an existing repository is updated upon re-running the install command (see below), without a new clone is made.

Updating ./.venv/src/froide-fax clone (to revision main)
  Running command git fetch -q --tags
  Running command git reset --hard -q 09a7bcec76d3da6b2003516a775ed5657a7cc062

@charliermarsh
Copy link
Member

As of now we intentionally don't support this. It adds a lot of complexity and we actually don't re-clone at all upon re-running the install command (we have a cache that contains a copy of each repository, and we checkout-and-install as needed with incremental fetches).

@zanieb
Copy link
Member

zanieb commented Jul 25, 2024

I think we always cache git clones anyway, though I'm not sure about the nuances of our behavior here. Are you having problems with our behavior specifically?

@krmax44
Copy link
Author

krmax44 commented Jul 25, 2024

Just dropping the -e works fine as of now :)

@zanieb zanieb added the question Asking for clarification or support label Jul 25, 2024
@zanieb
Copy link
Member

zanieb commented Jul 25, 2024

Thanks! Let us know if you have more questions / a use-case that's not addressed.

@zanieb zanieb closed this as not planned Won't fix, can't repro, duplicate, stale Jul 25, 2024
@krmax44
Copy link
Author

krmax44 commented Jul 25, 2024

I found another difference: With -e, all files from the repository are available within .venv/src. WIthout, only relevant files (presumably as configured with setuptools) will be stored in site-packages. This is quite important to us, as we also include JavaScript files in the repo we need to access. (We can probably include these somehow with setuptools.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Asking for clarification or support
Projects
None yet
Development

No branches or pull requests

3 participants