Skip to content

Commit 4f81501

Browse files
committed
convert strs to ints for comparison
1 parent e99bc2d commit 4f81501

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

python/private/config_settings.bzl

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -225,10 +225,12 @@ def is_python_version_at_least(name, **kwargs):
225225
)
226226

227227
def _python_version_at_least_impl(ctx):
228-
at_least = tuple(ctx.attr.at_least.split("."))
229-
current = tuple(
230-
ctx.attr._major_minor[config_common.FeatureFlagInfo].value.split("."),
231-
)
228+
at_least = tuple([int(x) for x in ctx.attr.at_least.split(".")])
229+
current = tuple([
230+
int(x)
231+
for x in ctx.attr._major_minor[config_common.FeatureFlagInfo].value.split(".")
232+
])
233+
print(current, at_least)
232234
value = "yes" if current >= at_least else "no"
233235
return [config_common.FeatureFlagInfo(value = value)]
234236

0 commit comments

Comments
 (0)