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

Platform markers are ignored when syncing optional self-dependencies #9499

Closed
befelix opened this issue Nov 28, 2024 · 3 comments · Fixed by #9509
Closed

Platform markers are ignored when syncing optional self-dependencies #9499

befelix opened this issue Nov 28, 2024 · 3 comments · Fixed by #9509
Assignees
Labels
bug Something isn't working

Comments

@befelix
Copy link

befelix commented Nov 28, 2024

In the following minimal pyproject.toml file, we are creating a package where the self optional dependency that depends on the base extra (the tomli package) through a self-dependency together with a platform marker that is not satisfied on my Linux machine. When running uv sync --extra self the packages from the base extra get installed, even though the platform marker should exclude them.

$ uv sync --extra self

Using CPython 3.13.0
Creating virtual environment at: .venv
Resolved 2 packages in 5ms
Installed 1 package in 2ms
 + tomli==2.2.1
[project]
name = "testing"
version = "0.1.0"
requires-python = ">=3.11"
dependencies = []

[project.optional-dependencies]
base = [
    "tomli>=2.2.1",
]
self = [
    "testing[base]; platform_system == 'Windows'",
]

[tool.uv.sources]
testing = { workspace = true }
  • platform: Linux
  • uv version: 0.5.5
@konstin konstin added the bug Something isn't working label Nov 28, 2024
@BhupalPrajapati
Copy link

[project.optional-dependencies]
base = [
"tomli>=2.2.1; platform_system == 'Windows'",
]
self = [
"testing[base]",
]

@charliermarsh charliermarsh self-assigned this Nov 28, 2024
@charliermarsh
Copy link
Member

I got it.

@charliermarsh
Copy link
Member

(Good bug!)

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.

4 participants