Skip to content

Commit

Permalink
Cherrypick mods from nodejs/gyp-next#201
Browse files Browse the repository at this point in the history
  • Loading branch information
cclauss committed Sep 14, 2023
1 parent 7aad092 commit 3b10136
Show file tree
Hide file tree
Showing 2 changed files with 3 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 distutils.version import StrictVersion
from packaging.version import Version
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": StrictVersion}
env = {"__builtins__": {}, "v": Version}
if eval(ast_code, env, variables):
return true_dict
return false_dict
Expand Down
1 change: 1 addition & 0 deletions gyp/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ classifiers = [
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
]
dependencies = ["packaging"]

[project.optional-dependencies]
dev = ["flake8", "pytest"]
Expand Down

0 comments on commit 3b10136

Please sign in to comment.