mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-06 13:00:15 +02:00
Scripts: Stop using deprecated Distutils
According to PEP 386: https://www.python.org/dev/peps/pep-0386/ distutils is deprecated and will be removed in an upcoming python version. Switch over to pkg_resources for version parsing and comparison
This commit is contained in:
1 parent
57a56545b2
commit
9911fe68d4
1 file changed
+2
-2
@@ -2,7 +2,7 @@
|
||||
import re
|
||||
import sys
|
||||
import subprocess
|
||||
from distutils.version import LooseVersion, StrictVersion
|
||||
from pkg_resources import parse_version
|
||||
|
||||
# Order this list from oldest to newest
|
||||
# try not to list something newer than our minimum compiler supported version
|
||||
@@ -80,7 +80,7 @@ for core in cpuinfo:
|
||||
IDList = BigCoreIDs.get(core)
|
||||
if type(IDList) is list:
|
||||
for ID in IDList:
|
||||
if StrictVersion(clang_version) >= StrictVersion(ID[1]):
|
||||
if parse_version(clang_version) >= parse_version(ID[1]):
|
||||
largest_big = ID[0]
|
||||
else:
|
||||
largest_big = BigCoreIDs.get(core)
|
||||
|
||||
Reference in new issue
Block a user