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

adding tool.uv.environments results in sync --locked always failing #7876

Closed
garymm opened this issue Oct 2, 2024 · 3 comments · Fixed by #7894
Closed

adding tool.uv.environments results in sync --locked always failing #7876

garymm opened this issue Oct 2, 2024 · 3 comments · Fixed by #7894
Assignees
Labels
bug Something isn't working

Comments

@garymm
Copy link

garymm commented Oct 2, 2024

Hi. Thank you for uv! It's awesome.
I'm not sure if I'm doing something wrong, but I can't get sync --locked to work when specifying tool.uv.environments in my pyproject.toml. Example:

#:schema https://json.schemastore.org/pyproject.json
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[project]
name = "demo"
requires-python = ">=3.11,<3.12"
# https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#static-vs-dynamic-metadata
dynamic = ["version"]
dependencies = [
    "pytest>=8.3.3",
]

[tool.uv]
environments = [
    "sys_platform == 'darwin' and platform_machine == 'arm64' and python_version>='3.11' and python_version<'3.12'",
    "sys_platform == 'linux' and platform_machine == 'aarch64' and python_version>='3.11' and python_version<'3.12'",
    "sys_platform == 'linux' and platform_machine == 'x86_64' and python_version>='3.11' and python_version<'3.12'",
]
➜ uv --version
uv 0.4.17
➜ uv lock
Using CPython 3.11.9
Resolved 5 packages in 682ms
➜ uv sync --locked
Using CPython 3.11.9
Creating virtual environment at: .venv
Resolved 5 packages in 4ms
error: The lockfile at `uv.lock` needs to be updated, but `--locked` was provided. To update the lockfile, run `uv lock`.
@zanieb
Copy link
Member

zanieb commented Oct 2, 2024

Weird, thanks.

cc @BurntSushi / @charliermarsh

@zanieb zanieb added the bug Something isn't working label Oct 2, 2024
@charliermarsh charliermarsh self-assigned this Oct 2, 2024
@charliermarsh
Copy link
Member

Thanks, I'll fix this tomorrow!

@charliermarsh
Copy link
Member

(I see the issue.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants