Skip to content

Expose UV NoBuildIsolation in some way #1124

Closed

Description

@tdejager

Problem description

UV, like pip has the concept of NoBuildIsolation where it doesn't create a venv for building and it does not install requirements, these need to be installed.

Exposing this allows us to use conda dependencies for building.

The question mainly is how we want to expose this, @pavelzw suggested: #1088 (comment)

[pypi-dependencies]
my-package = {path = ".", editable = true, no-build-isolation = true}

[dependencies]
setuptools = "*"
setuptools-scm = "*"

Because this is somwhat a global setting in UV to support it in this way we would need to create two seperate BuildDispatch's to support this and two seperate DistributionDatabases, and select which one to use somehow.

The easiest approach is to use a global project setting and then this is enabled for every sdist and every editable. This is quite brittle though, because if you use another sdist you might need to manually update your dependencies (to account for new build dependencies), as uv will no longer handle this.

Activity

  1. baszalmstra commented on Jul 29, 2024

    @baszalmstra
    Contributor

    What is the reason we want build isolation? From my perspective, the conda environment that is created to run the pypi build is already isolated. I feel like Im missing something.

  2. Hofer-Julian commented on Jul 29, 2024

    @Hofer-Julian
    Member

    @baszalmstra I also can't think of a situation where we would want build isolation.
    IIRC, the current situation is that we always have build isolation.

  3. tdejager commented on Jul 29, 2024

    @tdejager
    ContributorAuthor

    I will get back to this, but there are multiple reasons :)

  4. added
    needs-decision
    on Aug 5, 2024
  5. baszalmstra commented on Sep 3, 2024

    @baszalmstra
    Contributor

    #1909 was merged which should enable this!

  6. jeremyben commented on Sep 3, 2024

    @jeremyben

    Wonderful ! The escape hatch per package is perfect for security as well. Thanks for the hard work.

  7. tdejager commented on Sep 4, 2024

    @tdejager
    ContributorAuthor

    Great that you find it useful. Yeah the reasoning from my end is also that the feature is less useful if you cannot set it per package as you would need to manually manage all your sdist dependencies for all sdists in the project otherwise.

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

    enhancementneeds-decisionpypi

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions