diff --git a/makepanda/makepandacore.py b/makepanda/makepandacore.py index 1e32c11dd3..cfc19fb1ad 100644 --- a/makepanda/makepandacore.py +++ b/makepanda/makepandacore.py @@ -284,7 +284,7 @@ def GetHost(): return 'darwin' elif sys.platform.startswith('linux'): try: - # Python seems to offer no built-in way to check this. + # Python versions before 3.13 reported android as "linux" osname = subprocess.check_output(["uname", "-o"]) if osname.strip().lower() == b'android': return 'android' @@ -294,6 +294,9 @@ def GetHost(): return 'linux' elif sys.platform.startswith('freebsd'): return 'freebsd' + # Handle for Python >= 3.13 + elif sys.platform == 'android': + return 'android' else: exit('Unrecognized sys.platform: %s' % (sys.platform)) diff --git a/panda/src/android/site.py b/panda/src/android/site.py index 7c8d22e207..ac04b2bf7c 100644 --- a/panda/src/android/site.py +++ b/panda/src/android/site.py @@ -6,6 +6,7 @@ from importlib.machinery import ModuleSpec from importlib import _bootstrap_external +# This should not be needed once we bump the minimum python version requirement to 3.13 sys.platform = "android" class AndroidExtensionFinder(MetaPathFinder):