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

Support different versions of the same package installed based on the markers in the --only-lock mode #15

Open
yurijmikhalevich opened this issue Aug 11, 2023 · 0 comments

Comments

@yurijmikhalevich
Copy link

For example, I have in my pyproject.toml:

torch = [
  { version = "==2.0.1", source = "pypi", markers = "sys_platform != 'linux' or platform_machine == 'aarch64'" },
  { version = "==2.0.1+cpu", source = "pytorch-cpu", markers = "sys_platform == 'linux' and platform_machine != 'aarch64'" }
]
torchvision = [
  { version = "==0.15.2", source = "pypi", markers = "sys_platform != 'linux' or platform_machine == 'aarch64'" },
  { version = "==0.15.2+cpu", source = "pytorch-cpu", markers = "sys_platform == 'linux' and platform_machine != 'aarch64'" }
]

And poetry build generates:

Requires-Dist: torch (==2.0.1) ; sys_platform != "linux" or platform_machine == "aarch64"
Requires-Dist: torch (==2.0.1+cpu) ; sys_platform == "linux" and platform_machine != "aarch64"
Requires-Dist: torchvision (==0.15.2) ; sys_platform != "linux" or platform_machine == "aarch64"
Requires-Dist: torchvision (==0.15.2+cpu) ; sys_platform == "linux" and platform_machine != "aarch64"

But poetry blixbuild --only-lock generates (when built on macOS):

Requires-Dist: torch (==2.0.1)
Requires-Dist: torchvision (==0.15.2)

poetry blixbuild includes both versions, but I would love to fix all the versions to the ones specified in the poetry.lock and have the wheel installable on both Linux and non-Linux OSes.

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

No branches or pull requests

1 participant