forked from kivy/python-for-android
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathentrypoints.py
More file actions
20 lines (16 loc) · 736 Bytes
/
entrypoints.py
File metadata and controls
20 lines (16 loc) · 736 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
from pythonforandroid.recommendations import check_python_version
from pythonforandroid.util import BuildInterruptingException, handle_build_exception
def main():
"""
Main entrypoint for running python-for-android as a script.
"""
try:
# Check the Python version before importing anything heavier than
# the util functions. This lets us provide a nice message about
# incompatibility rather than having the interpreter crash if it
# reaches unsupported syntax from a newer Python version.
check_python_version()
from pythonforandroid.toolchain import ToolchainCL
ToolchainCL()
except BuildInterruptingException as exc:
handle_build_exception(exc)