We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d462da2 commit 0ffcb39Copy full SHA for 0ffcb39
setup.py
@@ -96,8 +96,10 @@ def get_dist(pkgname):
96
return None
97
98
pytorch_dep = os.getenv("TORCH_PACKAGE_NAME", "torch")
99
- if os.getenv("PYTORCH_VERSION"):
100
- pytorch_dep += "==" + os.getenv("PYTORCH_VERSION")
+ if version_pin := os.getenv("PYTORCH_VERSION"):
+ pytorch_dep += "==" + version_pin
101
+ elif (version_pin_ge := os.getenv("PYTORCH_VERSION_GE")) and (version_pin_lt := os.getenv("PYTORCH_VERSION_LT")):
102
+ pytorch_dep += f">={version_pin_ge},<{version_pin_lt}"
103
104
requirements = [
105
"numpy",
0 commit comments