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 more fine-grained control for uv sync command #5258

Closed
Vigilans opened this issue Jul 21, 2024 · 1 comment · Fixed by #5592
Closed

Expose more fine-grained control for uv sync command #5258

Vigilans opened this issue Jul 21, 2024 · 1 comment · Fixed by #5592

Comments

@Vigilans
Copy link
Contributor

Vigilans commented Jul 21, 2024

uv sync can be roughly divided into three steps:

  1. Sync venv (uses project.requires-python in pyproject.toml)
  2. Sync dependencies (uses project.dependencies in pyproject.toml)
  3. Install project

User may demand more specific behaviors in the sync process. For example:

  1. User may only want to sync venv. (Create a venv based on current project's project.requires-python in pyproject.toml)
  2. User may only want to sync venv and install the dependency, but do not install the project. (Allow users to install a project's dependencies, without the project itself #4028, Feature request: add a way to install only build dependencies #1516)
  3. User may want to fully sync the environment, but install the project in editable mode.

Example 2 and 3 can be achieved with workaround if we have 1:
2. Use uv pip install -r pyproject.toml on the synced venv.
3. Use uv pip install -e . on the synced venv.

I would like to know do we have a way to only create venv based on requires-python in pyproject.toml?

@zanieb
Copy link
Member

zanieb commented Jul 21, 2024

To respond in part: I think, in the future, uv venv will respect the pyproject.toml by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants