mirror of https://github.com/kivy/kivy.git
init: don't set configuration from android if we are in the "documentation" mode
+ use ANDROID_ARGUMENT availability in environ instead of "import android" for detecting the android platform: sl4a have their own android.py too. Closes #719
This commit is contained in:
parent
ed75b67abb
commit
7c96bfa504
|
@ -12,6 +12,7 @@ __all__ = ('intersection', 'difference', 'strtotuple',
|
|||
'interpolate', 'OrderedDict', 'QueryDict',
|
||||
'platform', 'escape_markup', 'reify')
|
||||
|
||||
from os import environ
|
||||
from sys import platform as _sys_platform
|
||||
from re import match, split
|
||||
from UserDict import DictMixin
|
||||
|
@ -332,11 +333,9 @@ def platform():
|
|||
global _platform_ios, _platform_android
|
||||
|
||||
if _platform_android is None:
|
||||
try:
|
||||
import android
|
||||
_platform_android = True
|
||||
except ImportError:
|
||||
_platform_android = False
|
||||
# ANDROID_ARGUMENT and ANDROID_PRIVATE are 2 environment variables from
|
||||
# python-for-android project
|
||||
_platform_android = 'ANDROID_ARGUMENT' in environ
|
||||
|
||||
if _platform_ios is None:
|
||||
# TODO implement ios support here
|
||||
|
|
Loading…
Reference in New Issue