Skip to content

Commit

Permalink
from packaging.version import parse as version_parse
Browse files Browse the repository at this point in the history
  • Loading branch information
cclauss authored Oct 4, 2023
1 parent 0d12437 commit 2674e88
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gyp/pylib/gyp/input.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import sys
import threading
import traceback
from packaging.version import Version
from packaging.version import parse as version_parse
from gyp.common import GypError
from gyp.common import OrderedSet

Expand Down Expand Up @@ -1183,7 +1183,7 @@ def EvalSingleCondition(cond_expr, true_dict, false_dict, phase, variables, buil
else:
ast_code = compile(cond_expr_expanded, "<string>", "eval")
cached_conditions_asts[cond_expr_expanded] = ast_code
env = {"__builtins__": {}, "v": Version}
env = {"__builtins__": {}, "v": version_parse}
if eval(ast_code, env, variables):
return true_dict
return false_dict
Expand Down

0 comments on commit 2674e88

Please sign in to comment.