Skip to content

Commit 2efeee1

Browse files
committed
[OT] FIX for kivy#289 and kivy#186
1 parent 05f3f3c commit 2efeee1

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

bootstrap/minimal/assets/_bootstrap.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ def flush(self):
8888
#
8989

9090
import imp
91+
import os
9192
from os.path import join, exists
9293

9394
ANDROID_LIB_PATH = posix.environ["ANDROID_LIB_PATH"]
@@ -115,6 +116,18 @@ def load_module(self, fullname):
115116

116117
sys.meta_path.append(CustomBuiltinImporter())
117118

119+
#
120+
# Step 4: fix some modules
121+
#
122+
123+
# tempfile: https://github.com/kivy/python-for-android/issues/289
124+
tempdir_name = posix.environ["ANDROID_EXTERNAL_DATA_PATH"]+'/tmp'
125+
if not exists(tempdir_name):
126+
tempdir = os.mkdir(tempdir_name, 770)
127+
os.environ['TMPDIR'] = tempdir_name
128+
129+
# _scproxy: https://github.com/kivy/python-for-android/issues/186
130+
sys.platform = 'linux2'
118131

119132
#
120133
# Step 4: bootstrap the application !

0 commit comments

Comments
 (0)