Skip to content

Fixes for #289 and #186 #307

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 30, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion bootstrap/minimal/assets/_bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ def flush(self):
#

import imp
import os
from os.path import join, exists

ANDROID_LIB_PATH = posix.environ["ANDROID_LIB_PATH"]
Expand Down Expand Up @@ -115,9 +116,21 @@ def load_module(self, fullname):

sys.meta_path.append(CustomBuiltinImporter())

#
# Step 5: fix some modules
#

# tempfile: https://github.com/kivy/python-for-android/issues/289
tempdir_name = posix.environ["ANDROID_EXTERNAL_DATA_PATH"]+'/tmp'
if not exists(tempdir_name):
tempdir = os.mkdir(tempdir_name, 770)
os.environ['TMPDIR'] = tempdir_name

# _scproxy: https://github.com/kivy/python-for-android/issues/186
sys.platform = 'linux2'

#
# Step 4: bootstrap the application !
# Step 6: bootstrap the application !
#

main_module = sys.argv[1]
Expand Down