uv/scripts
Charlie Marsh 6392961f44
Add support for extras in editable requirements (#1531)
## Summary

If you're developing on a package like `attrs` locally, and it has a
recursive extra like `attrs[dev]`, it turns out that we then try to find
the `attrs` in `attrs[dev]` from the registry, rather than recognizing
that it's part of the editable.

This PR fixes the issue by making editables slightly more first-class
throughout the resolver. Instead of mocking metadata, we explicitly
check for extras in various places. Part of the problem here is that we
treated editables as URL dependencies, but when we saw an _extra_ like
`attrs[dev]`, we didn't map that back to the URL. So now, we treat them
as registry dependencies, but with the appropriate guardrails
throughout.

Closes https://github.com/astral-sh/uv/issues/1447.

## Test Plan

- Cloned `attrs`.
- Ran `cargo run venv && cargo run pip install -e ".[dev]" -v`.
2024-02-16 18:48:35 -05:00
..
bench Rename to uv (#1302) 2024-02-15 11:19:46 -06:00
benchmarks Rename to uv (#1302) 2024-02-15 11:19:46 -06:00
bootstrap nit: make bootstrap/install.py executable (#1385) 2024-02-16 00:14:29 +00:00
compare_with_pip Rename to uv (#1302) 2024-02-15 11:19:46 -06:00
editable-installs Add support for extras in editable requirements (#1531) 2024-02-16 18:48:35 -05:00
popular_packages Finish install-many with pypi 10k most dependents (#732) 2023-12-27 09:42:51 -05:00
requirements Rename to uv (#1302) 2024-02-15 11:19:46 -06:00
scenarios Support recursive extras (#1435) 2024-02-16 11:42:04 -05:00
wheels Implement --find-links as flat indexes (directories in pip-compile) (#912) 2024-01-15 02:04:10 +00:00