scripts/arch: remove usage of deprecated LooseVersion
replace with version.parse from packaging module. prevent this warning message: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives Signed-off-by: Julien Massot <julien.massot@iot.bzh>
This commit is contained in:
parent
f0a2a17bdc
commit
36f116b47f
8 changed files with 18 additions and 18 deletions
|
@ -40,14 +40,14 @@ import sys
|
|||
import struct
|
||||
import os
|
||||
|
||||
from distutils.version import LooseVersion
|
||||
from packaging import version
|
||||
|
||||
import elftools
|
||||
from elftools.elf.elffile import ELFFile
|
||||
from elftools.elf.sections import SymbolTableSection
|
||||
|
||||
|
||||
if LooseVersion(elftools.__version__) < LooseVersion('0.24'):
|
||||
if version.parse(elftools.__version__) < version.parse('0.24'):
|
||||
sys.exit("pyelftools is out of date, need version 0.24 or later")
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue