-
Notifications
You must be signed in to change notification settings - Fork 943
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
Add --non-editable
to allow syncing with non-editable workspace members
#5792
Comments
(It's very easy to do.) |
If no one objects I can add it, not too hard. |
I don't fully understand what this means. I worry how close the flag is to |
It would mean: install the project and any workspace members as non-editable. So, build them to sdists, and install them into the environment, rather than adding a |
Hm. |
Hi, I think I would need this flag, but maybe it is better to describe my use case, there might be another solution for it with uv: I want to setup multiple AWS Lambda Functions, which all come with their own dependencies, some use flask, some don't, etc. For local development it is convenient, to have one virtual environment, so I go with setting up a virtual workspace. I add multiple packages, one for each Lambda function. I add one "shared" package, which I will use for code that is shared between all Lambdas. I install the shared package into the other ones, which will create an entry like:
Next I create the Lambda artefact, by installing the package with
From my point of view, |
I would use such a flag, yes, for the project itself (I don't use workspaces (yet)). Apologies if this not what this issue is about. The initial use-case (a few years ago) was for multi-stage Docker builds: install every deps + project in a first stage, copy in a later stage. Editable installs of the project would not be working once the venv was copied in the final stage, since the sources were not present anymore. The current use-case is to make CI more robust (to spot packaging issues early), with something like this: if [ -n "${CI}" ]; then
uv sync --no-editable-project
else
uv sync
fi |
This would be very useful when building docker images with workspaces - you would be able to do something akin to: RUN --mount=bind,from=project,source=src/,target=src/ \
--mount=type=bind,from=project,source=pyproject.toml,target=pyproject.toml \
--mount=type=bind,from=project,source=uv.lock,target=uv.lock \
uv sync --frozen and avoid having to copy the |
@charliermarsh @zanieb Is there anything further the community could provide input on here? Noting that CM said this was relatively easy; this one feature is all that remains for us to move our large monorepo completely over to (Unfortunately, my Rust is non-existent, and I'm not in a position to submit an actual PR. 🫠) |
I think I can take this one on soon. It’s mostly about figuring the right names / UX / concepts. |
Do we want to support this?
The text was updated successfully, but these errors were encountered: