Skip to content

Exclude packages from no-build setting #17038

Open

Description

@mkniewallner

Summary

Sync-related commands support no-build setting (and the equivalent --no-build argument and UV_NO_BUILD environment variable), which is useful to avoid running arbitrary code during building, or could be useful when bumping to a new minor Python version, to ensure that no wheels are lost when bumping to the new version.

Sometimes though, some packages (like uWSGI) don't provide wheels at all. It doesn't seem that there's a way to exclude some specific packages from no-build. Would it make sense to support that? This would allow using the option by default as a security measure, but still make it possible to exclude specific packages that knowingly don't provide wheels.

Note that there is a no-build-package setting, but it requires explicitly setting each package rather than excluding specific ones, which is not convenient since adding a dependency (or having a new transitive one) would require to update the list.

Example

[tool.uv]
no-build = true
# Not sure what would be the best name.
no-build-exclude = ["uWSGI"]

Activity

  1. zanieb commented on Dec 8, 2025

    @zanieb
    Member

    You can do this already with --no-binary-package uWSGI, though it may be nice to have a separate field which does not ignore binaries.

  2. mkniewallner commented on Dec 9, 2025

    @mkniewallner
    ContributorAuthor

    You can do this already with --no-binary-package uWSGI

    Oh indeed, I missed that somehow.

    it may be nice to have a separate field which does not ignore binaries.

    I guess that this would avoid failing if wheels are not present, but instead of completely skipping them, using them if they ever get available at some point, right? If that's the case it could indeed still be useful, though less important I believe with --no-binary-package being available, so more like a nice-to-have.

  3. Nadock commented on Jan 27, 2026

    @Nadock

    Having the option to allow builds for only some packages, but still using wheels for those packages when available, would be handy.

    An example I've encountered recently is a package with wheels for Linux x86_64 but not arm64. To support both environments with the no-build option we have to build the relevant package in both environments, even if a wheel is available for one of them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    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