Skip to content

Commit 8d27c83

Browse files
committed
Merge pull request #566 from kivy/fix-compileall
Fix -m compileall
2 parents d7c37f3 + 888e378 commit 8d27c83

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

pythonforandroid/bootstraps/pygame/__init__.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,15 @@ def run_distribute(self):
4141
shprint(sh.cp, '-a', join(src_path, 'res'), '.')
4242
shprint(sh.cp, '-a', join(src_path, 'blacklist.txt'), '.')
4343
shprint(sh.cp, '-a', join(src_path, 'whitelist.txt'), '.')
44-
44+
4545
info('Copying python distribution')
4646
hostpython = sh.Command(self.ctx.hostpython)
4747
# AND: This *doesn't* need to be in arm env?
48-
shprint(hostpython, '-OO', '-m', 'compileall', self.ctx.get_python_install_dir(),
49-
_tail=10, _filterout="^Listing", _critical=True)
48+
try:
49+
shprint(hostpython, '-OO', '-m', 'compileall', self.ctx.get_python_install_dir(),
50+
_tail=10, _filterout="^Listing")
51+
except sh.ErrorReturnCode:
52+
pass
5053
if not exists('python-install'):
5154
shprint(sh.cp, '-a', self.ctx.get_python_install_dir(), './python-install')
5255

@@ -58,7 +61,7 @@ def run_distribute(self):
5861
if not exists(join('private', 'lib')):
5962
shprint(sh.cp, '-a', join('python-install', 'lib'), 'private')
6063
shprint(sh.mkdir, '-p', join('private', 'include', 'python2.7'))
61-
64+
6265
# AND: Copylibs stuff should go here
6366
shprint(sh.mv, join('libs', arch.arch, 'libpymodules.so'), 'private/')
6467
shprint(sh.cp, join('python-install', 'include' , 'python2.7', 'pyconfig.h'), join('private', 'include', 'python2.7/'))

0 commit comments

Comments
 (0)