-
Notifications
You must be signed in to change notification settings - Fork 900
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
uv lock
Improvement: a consistent environment for prepare_metadata_for_build_wheel
.
#7390
Comments
There's a significant downside to this, which is that it would require that we create a virtual environment to perform Can you file the second suggestion here as its own issue? I think it's separate. \cc @zanieb |
|
IIUC all package that have a dynamic metadata or without a pyproject.toml will need an environment to run |
is there any roadmap for this? |
I misread your second suggestion. I thought you were suggesting something like #7393 which would also fix this by allowing you to define the Chumpy requirements upfront rather than requiring that we build it. |
The |
If a user said: [[tool.uv.lock-resolution]]
name = "flash-attn"
dependencies = ["setuptools", "packaging", "torch"] Then we would install setuptools, packaging, and torch in an isolated environment -- is that the suggestion? I don't know that this would solve the general case. It's typically not the case that users disable build isolation because a package fails to declare the right build dependencies -- that is sometimes true, like for Chumpy, but typically, build isolation is disabled because you need to build against a specific version of an installed dependency, like for PyTorch. |
Okay that sounds bad. |
Let me look... The main idea was that we wanted to add a new build isolation API for name = "flash-attn"
dependencies = ["setuptools", "packaging", "torch"] ...could create a virtual environment, and then give it access to the already-installed |
I think |
Can we provide a first-class support for "switching between two (or more) optional dependencies groups"? [[tool.uv.build-stage]]
# environment variables etc. can also be set.
dependencies = ["setuptools", "packaging", "psutil", "ninja", "torch"]
outputs = ["flash-attn", "some-other-packages"]
[[tool.uv.build-stage]]
dependencies = ["setuptools", "torch", "flash-attn"]
outputs = ["some-packages"] |
Currently,
uv lock
runs in the Python interpreter specified by "Python options" (shown byuv lock --help
).However, as discussed in #7291 , even managed Python Interpreters can have an environment inconsistent with the default virtual environment created by
uv venv
.Let
uv lock
be "polluted" by the system Python Interpreter with an arbitrary environment sounds even worse.[deleted]
Ideally we can specify this inpyproject.toml
with a default to an environment equivalent to the one created byuv venv
.And we can also specify
index-url
.Expectation by example:
OR[deleted]
The text was updated successfully, but these errors were encountered: