File tree 1 file changed +8
-2
lines changed
1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -96,8 +96,14 @@ def get_dist(pkgname):
96
96
return None
97
97
98
98
pytorch_dep = os .getenv ("TORCH_PACKAGE_NAME" , "torch" )
99
- if os .getenv ("PYTORCH_VERSION" ):
100
- pytorch_dep += "==" + os .getenv ("PYTORCH_VERSION" )
99
+ if version_pin := os .getenv ("PYTORCH_VERSION" ):
100
+ pytorch_dep += "==" + version_pin
101
+ elif (version_pin_ge := os .getenv ("PYTORCH_VERSION_GE" )) and (version_pin_lt := os .getenv ("PYTORCH_VERSION_LT" )):
102
+ # This branch and the associated env vars exist to help third-party
103
+ # builds like in https://github.com/pytorch/vision/pull/8936. This is
104
+ # supported on a best-effort basis, we don't guarantee that this won't
105
+ # eventually break (and we don't test it.)
106
+ pytorch_dep += f">={ version_pin_ge } ,<{ version_pin_lt } "
101
107
102
108
requirements = [
103
109
"numpy" ,
You can’t perform that action at this time.
0 commit comments