Skip to content

Commit 9f3d275

Browse files
committed
Fixes for python3 in recipes and sdl2 bootstrap
1 parent 22c782c commit 9f3d275

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

pythonforandroid/bootstraps/pygame/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def run_distribute(self):
1818
# src_path = join(self.ctx.root_dir, 'bootstrap_templates',
1919
# self.name)
2020
src_path = join(self.bootstrap_dir, 'build')
21-
21+
2222
with current_directory(self.dist_dir):
2323

2424
info('Creating initial layout')

pythonforandroid/bootstraps/sdl2/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def run_distribute(self):
8888
warning('Can\'t find strip in PATH...')
8989
strip = sh.Command(strip)
9090
filens = shprint(sh.find, join(self.dist_dir, 'private'), join(self.dist_dir, 'libs'),
91-
'-iname', '*.so', _env=env).stdout
91+
'-iname', '*.so', _env=env).stdout.decode('utf-8')
9292
logger.info('Stripping libraries in private dir')
9393
for filen in filens.split('\n'):
9494
try:

pythonforandroid/bootstraps/sdl2/build/build.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def render(template, dest, **kwargs):
6262
template = environment.get_template(template)
6363
text = template.render(**kwargs)
6464

65-
f = file(dest, 'wb')
65+
f = open(dest, 'wb')
6666
f.write(text.encode('utf-8'))
6767
f.close()
6868

pythonforandroid/recipes/python2/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def build_armeabi(self):
8888
_env=env)
8989
except sh.ErrorReturnCode_2:
9090
print('First python2 make failed. This is expected, trying again.')
91-
91+
9292

9393
print('Second install (expected to work)')
9494
shprint(sh.touch, 'python.exe', 'python')

0 commit comments

Comments
 (0)