-
Notifications
You must be signed in to change notification settings - Fork 996
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
Editable installation with extras #7845
Comments
Don't you want That's how it works for pip, and I believe uv is copying the behavior here. |
OK, thanks for pointing this out, in fact it works. It's a bit surprising that But I can very well live with that, thank you for doing a great job with uv. |
|
As this option appears in the output for In fact IMO it wouldn't be useful to apply this to all transitive dependencies, no. |
Yeah:
This looks like a bug, |
|
That makes sense, the If no one else does I might write a PR, or else I will be confused when I come across this again in a years time. |
I was just writing up a similar experience when I found this one. What I wrote up-- I attempted to install a project that had a pyproject.toml in the root and several extras defined:
It worked when I ran:
It seemed unnecessary, since I think another example in the documentation could be helpful. I was looking through https://docs.astral.sh/uv/pip/packages/#editable-packages for guidance. |
Keep in mind that --editable can also be mentioned multiple times, this means that we might want to ensure that we allow mentioning the all extras as a part of the --editable argument. Maybe |
$ uv --version
uv 0.5.15
$ uv pip install ./pyproject.toml --all-extras
error: Requesting extras requires a `pyproject.toml`, `setup.cfg`, or `setup.py` file. <-- why?
$ uv pip install ./pyproject.toml
error: Failed to parse: `./pyproject.toml`
Caused by: Expected path (`./pyproject.toml`) to end in a supported file extension: <-- why?
`.whl`, `.tar.gz`, `.zip`, `.tar.bz2`, `.tar.lz`, `.tar.lzma`, `.tar.xz`, `.tar.zst`, `.tar`, `.tbz`, `.tgz`, `.tlz`, or `.txz`
./pyproject.toml
^^^^^^^^^^^^^^^^
$ ls pyproject.toml
pyproject.toml
$ uv pip install -e .
Using Python 3.12.7 environment at: /home/akaihola/.cache/myproject/.venv
Audited 1 package in 131ms As a work-around, this seems to work: $ uv pip compile --all-extras pyproject.toml | uv pip install -r -
Resolved 34 packages in 39ms
Using Python 3.12.7 environment at: /home/akaihola/.cache/aider-chat/.venv
Resolved 34 packages in 33ms
Prepared 9 packages in 202ms
Uninstalled 9 packages in 115ms
Installed 9 packages in 37ms
$ uv pip install -e .
Using Python 3.12.7 environment at: /home/akaihola/.cache/myproject/.venv
Audited 1 package in 131ms |
When I try to install extras for an editable installation, e.g.
uv pip install -e . --all-extras
, uv refuses this with an error message:Without
--extra
or ´--all-extras` everything is fine, so the pyproject.toml file is obviously present and can be processed.Particularly with an
install -e
, however, it's often desirable to install the dev dependencies;uv pip install
doesn't have any kind of--dev
flag (unless I miss something).I haven't provided a full working sample as I think this behaviour doesn't depend on any particular conditions, but of course I'll try to prepare a stripped-down sample if it helps. I'm using uv 0.4.17.
The text was updated successfully, but these errors were encountered: