Skip to content

Commit 4eb8041

Browse files
brjspTrott
authored andcommitted
Replace uses of python distutils library
It is not available anymore in Python 3.12: https://peps.python.org/pep-0632/
1 parent 5746691 commit 4eb8041

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

gyp/pylib/gyp/input.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
import sys
1717
import threading
1818
import traceback
19-
from distutils.version import StrictVersion
19+
from packaging.version import Version
2020
from gyp.common import GypError
2121
from gyp.common import OrderedSet
2222

@@ -1183,7 +1183,7 @@ def EvalSingleCondition(cond_expr, true_dict, false_dict, phase, variables, buil
11831183
else:
11841184
ast_code = compile(cond_expr_expanded, "<string>", "eval")
11851185
cached_conditions_asts[cond_expr_expanded] = ast_code
1186-
env = {"__builtins__": {}, "v": StrictVersion}
1186+
env = {"__builtins__": {}, "v": Version}
11871187
if eval(ast_code, env, variables):
11881188
return true_dict
11891189
return false_dict

0 commit comments

Comments
 (0)