Skip to content

Commit

Permalink
Replace uses of python distutils library
Browse files Browse the repository at this point in the history
It is not available anymore in Python 3.12: https://peps.python.org/pep-0632/
  • Loading branch information
brjsp authored and Trott committed Sep 28, 2023
1 parent 5746691 commit 4eb8041
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 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

0 comments on commit 4eb8041

Please sign in to comment.