uv
c48af312 - Add `--marker` flag to `uv add` (#12012)

Commit
1 year ago
Add `--marker` flag to `uv add` (#12012) ## 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>
Author
Parents
Loading