Skip to content

Feature Request: Support for no-install-package in pyproject.toml #12523

@garam-kim1

Description

@garam-kim1

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

  1. Add the following to pyproject.toml:

    [tool.uv]
    no-install-packages = ["example-package", "another-package"]
  2. Run uv sync. The specified packages would be excluded from installation without requiring additional flags.

Example

No response

Metadata

Metadata

Assignees

Labels

enhancementNew feature or improvement to existing functionality

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions