Skip to content

Commit

Permalink
Use packaging instead of distutils
Browse files Browse the repository at this point in the history
  • Loading branch information
rzhao271 committed Jul 29, 2023
1 parent 960321a commit 05ba71d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pylib/gyp/input.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
import sys
import threading
import traceback
from distutils.version import StrictVersion
from gyp.common import GypError
from gyp.common import OrderedSet
from packaging.version import Version

# A list of types that are treated as linkable.
linkable_types = [
Expand Down Expand Up @@ -1180,7 +1180,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

0 comments on commit 05ba71d

Please sign in to comment.