mirror of
https://gitee.com/zlgopen/awtk.git
synced 2024-11-29 18:48:09 +08:00
Fix deprecated distutils on python 3.12. (#867)
https://docs.python.org/3.12/whatsnew/3.12.html https://danielms.site/zet/2023/pythons-distutil-strtobool-replacement/
This commit is contained in:
parent
f5b18fba75
commit
cf9f76cf9d
@ -5,7 +5,7 @@ import json
|
|||||||
import shutil
|
import shutil
|
||||||
import importlib
|
import importlib
|
||||||
import collections
|
import collections
|
||||||
from distutils.util import strtobool
|
from utils import strtobool
|
||||||
|
|
||||||
global COMPILE_CONFIG
|
global COMPILE_CONFIG
|
||||||
COMPILE_CONFIG = None
|
COMPILE_CONFIG = None
|
||||||
|
5
scripts/utils.py
Normal file
5
scripts/utils.py
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
def strtobool(value: str) -> bool:
|
||||||
|
value = value.lower()
|
||||||
|
if value in ("y", "yes", "on", "1", "true", "t"):
|
||||||
|
return True
|
||||||
|
return False
|
Loading…
Reference in New Issue
Block a user