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.
For example, I have in my
pyproject.toml:And
poetry buildgenerates:But
poetry blixbuild --only-lockgenerates (when built on macOS):poetry blixbuildincludes both versions, but I would love to fix all the versions to the ones specified in thepoetry.lockand have the wheel installable on both Linux and non-Linux OSes.