mirror of
https://github.com/godotengine/godot.git
synced 2024-11-25 13:43:15 +00:00
Android: Replace deprecated distutils LooseVersion usage
(cherry picked from commit 9e9ea714ad
)
This commit is contained in:
parent
c558ce1495
commit
4da42804b4
@ -1,7 +1,6 @@
|
||||
import os
|
||||
import sys
|
||||
import platform
|
||||
from distutils.version import LooseVersion
|
||||
|
||||
|
||||
def is_active():
|
||||
@ -265,8 +264,14 @@ def configure(env):
|
||||
|
||||
# Link flags
|
||||
|
||||
# HACK: Replaced use of now obsoleted distutils.version.LooseVersion with this simple method,
|
||||
# which isn't bullet proof but should be sufficient here with "x.y.z" parameters.
|
||||
# Alternatives imply adding more dependencies.
|
||||
def version_tuple(v):
|
||||
return tuple(map(int, (v.split("."))))
|
||||
|
||||
ndk_version = get_ndk_version(env["ANDROID_NDK_ROOT"])
|
||||
if ndk_version != None and LooseVersion(ndk_version) >= LooseVersion("17.1.4828580"):
|
||||
if ndk_version != None and version_tuple(ndk_version) >= version_tuple("17.1.4828580"):
|
||||
env.Append(LINKFLAGS=["-Wl,--exclude-libs,libgcc.a", "-Wl,--exclude-libs,libatomic.a", "-nostdlib++"])
|
||||
else:
|
||||
env.Append(
|
||||
|
Loading…
Reference in New Issue
Block a user