mirror of https://github.com/astral-sh/uv
## Summary
Add a `--marker` flag to `uv add` which applies a marker to all given
requirements.
Example:
```
$ uv-debug add --marker "platform_machine == 'x86_64'" \
"anyio>=2.31.0" \
"iniconfig>=2; sys_platform != 'win32'" \
"numpy>1.19; sys_platform == 'win32'"
```
```toml
[project]
name = "project"
version = "0.1.0"
requires-python = ">=3.12.0"
dependencies = [
"anyio>=2.31.0 ; platform_machine == 'x86_64'",
"iniconfig>=2 ; platform_machine == 'x86_64' and sys_platform != 'win32'",
"numpy>1.19 ; platform_machine == 'x86_64' and sys_platform == 'win32'",
]
```
Fixes https://github.com/astral-sh/uv/issues/11987
## Test Plan
Added snapshot tests
---------
Co-authored-by: konstin <konstin@mailbox.org>
|
||
|---|---|---|
| .. | ||
| policies | ||
| troubleshooting | ||
| benchmarks.md | ||
| cli.md | ||
| index.md | ||
| resolver-internals.md | ||
| settings.md | ||