mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Add platform markers for linux only extra_install_requires (#88826)
Fixes #88049 https://github.com/pytorch/pytorch/pull/85097 added new extra dependencies on `nvidia-*`. They are linux (GPU) only packages, but were not marked as such, causing issues installing pytorch 1.13 via Poetry (and possibly other tools that follow PyPI's metadata API) on non-Linux systems. This "fixes" the issue by adding the `; platform_system = 'Linux'` marker on these dependencies, but the main problem of different metadata for different wheels is a [somewhat larger issue](https://github.com/pytorch/pytorch/issues/88049#issuecomment-1302555269). https://github.com/pytorch/pytorch/pull/85097 used `;` as a delimiter for splitting the different deps, but that is the delimiter used in markers, so I changed to split on `|`. Pull Request resolved: https://github.com/pytorch/pytorch/pull/88826 Approved by: https://github.com/neersighted, https://github.com/lalmei, https://github.com/malfet
This commit is contained in:
committed by
PyTorch MergeBot
parent
5654fed23e
commit
2e358cc98f
2
setup.py
2
setup.py
@ -852,7 +852,7 @@ def configure_extension_build():
|
||||
pytorch_extra_install_requirements = os.getenv("PYTORCH_EXTRA_INSTALL_REQUIREMENTS", "")
|
||||
if pytorch_extra_install_requirements:
|
||||
report(f"pytorch_extra_install_requirements: {pytorch_extra_install_requirements}")
|
||||
extra_install_requires += pytorch_extra_install_requirements.split(";")
|
||||
extra_install_requires += pytorch_extra_install_requirements.split("|")
|
||||
|
||||
|
||||
# Cross-compile for M1
|
||||
|
Reference in New Issue
Block a user