Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose UV NoBuildIsolation in some way #1124

Closed
tdejager opened this issue Apr 5, 2024 · 6 comments
Closed

Expose UV NoBuildIsolation in some way #1124

tdejager opened this issue Apr 5, 2024 · 6 comments
Labels
needs-decision Undecided if this should be done 🐍 pypi Issue related to PyPI dependencies ✨ enhancement Feature request

Comments

@tdejager
Copy link
Contributor

tdejager commented Apr 5, 2024

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.

@baszalmstra
Copy link
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.

@Hofer-Julian
Copy link
Contributor

@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.

@tdejager
Copy link
Contributor Author

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

@baszalmstra
Copy link
Contributor

#1909 was merged which should enable this!

@jeremyben
Copy link

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

@tdejager
Copy link
Contributor Author

tdejager commented Sep 4, 2024

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
Labels
needs-decision Undecided if this should be done 🐍 pypi Issue related to PyPI dependencies ✨ enhancement Feature request
Projects
None yet
Development

No branches or pull requests

5 participants