uv icon indicating copy to clipboard operation
uv copied to clipboard

Add `--exclude-packages` to pip compile/install/tool install

Open terror opened this issue 5 months ago • 2 comments

Part of https://github.com/astral-sh/uv/issues/16771

This diff introduces --exclude-packages to pip {compile, install, tool install}, accepting comma-delimited package names (with --exclude-package as an alias) to exclude packages without an excludes file.

terror avatar Nov 21 '25 17:11 terror

I need to think a bit more about what we want long-term, i.e., if we want to go this route or something like --exclude / --exclude-file long-term. I'm wary of adding more options without a clear plan since it'll just make it harder.

Otherwise, this looks good!

zanieb avatar Nov 21 '25 21:11 zanieb

I need to think a bit more about what we want long-term, i.e., if we want to go this route or something like --exclude / --exclude-file long-term. I'm wary of adding more options without a clear plan since it'll just make it harder.

Otherwise, this looks good!

I'm more a fan of what you just mentioned, i.e. --exclude / --exclude-file. IMO, the generic --exclude taking package names makes a bit more sense here.

terror avatar Nov 21 '25 21:11 terror