summaryrefslogtreecommitdiffstats
path: root/TOOLS
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2023-10-27 11:56:00 -0500
committerDudemanguy <random342@airmail.cc>2023-10-27 18:07:28 +0000
commit65806ac4d13913d23fa64f87e01ff760f2e2b329 (patch)
tree8c37a39a19c50872efc37e99a71c4e486dcc6378 /TOOLS
parent8bbcc87feea7abf256a6c7f511244d09f5520c17 (diff)
downloadmpv-65806ac4d13913d23fa64f87e01ff760f2e2b329.tar.bz2
mpv-65806ac4d13913d23fa64f87e01ff760f2e2b329.tar.xz
TOOLS/macos-sdk-version: use packaging instead of distutils for version
Python 3.10 deprecated disutils and then removed it in 3.12. The macos sdk check uses the version compare from there, so it needs to be replaced with something else. So instead use the API from the packaging module which is also widely available and a fit replacement. Fixes #12762.
Diffstat (limited to 'TOOLS')
-rwxr-xr-xTOOLS/macos-sdk-version.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/TOOLS/macos-sdk-version.py b/TOOLS/macos-sdk-version.py
index e3a973e857..ae1d355539 100755
--- a/TOOLS/macos-sdk-version.py
+++ b/TOOLS/macos-sdk-version.py
@@ -8,7 +8,7 @@ import re
import os
import string
import sys
-from distutils.version import StrictVersion
+from packaging import version
from shutil import which
from subprocess import check_output
@@ -56,7 +56,7 @@ def find_macos_sdk():
sdk_version = '10.10.0'
# pick the higher version, always pick sdk over build if newer
- if StrictVersion(build_version) > StrictVersion(sdk_version):
+ if version.parse(build_version) > version.parse(sdk_version):
return sdk,build_version
else:
return sdk,sdk_version