-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Description
Summary
Summary
I would like to request the ability to configure the no-install-package option directly in the pyproject.toml file for uv. This would allow users to persistently exclude specific packages from installation when running uv sync, without needing to pass the --no-install-package flag every time.
Motivation
Currently, the --no-install-package flag must be provided as a command-line argument, which can be inconvenient for projects that frequently need to exclude certain packages (e.g., platform-specific dependencies or optional packages). Adding support for this configuration in pyproject.toml would:
- Improve developer workflow by reducing repetitive command-line options.
- Allow teams to share consistent exclusion rules across environments via version-controlled configuration files.
- Enhance flexibility and usability of uv for complex dependency management scenarios.
Proposed Solution
Introduce a new configuration option under [tool.uv] in pyproject.toml, such as:
[tool.uv]
no-install-packages = ["package1", "package2"]When uv sync is run, any packages listed under no-install-packages would be excluded from installation automatically.
Example Usage
-
Add the following to
pyproject.toml:[tool.uv] no-install-packages = ["example-package", "another-package"]
-
Run
uv sync. The specified packages would be excluded from installation without requiring additional flags.
Example
No response