Skip to content

Commit 7174dfe

Browse files
committed
More fixes to hardcoded armeabi
Build works with armeabi-v7a now
1 parent 87dac5f commit 7174dfe

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

pythonforandroid/bootstraps/sdl2/__init__.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@ def run_distribute(self):
2121
fileh.write('sdk.dir={}'.format(self.ctx.sdk_dir))
2222

2323
# AND: Hardcoding armeabi - naughty!
24-
arch = ArchARM(self.ctx)
24+
arch = self.ctx.archs[0]
25+
if len(self.ctx.archs) > 1:
26+
raise ValueError('built for more than one arch, but bootstrap cannot handle that yet')
27+
info('Bootstrap running with arch {}'.format(arch))
2528

2629
with current_directory(self.dist_dir):
2730
info('Copying python distribution')
@@ -32,7 +35,6 @@ def run_distribute(self):
3235
shprint(sh.mkdir, 'assets')
3336

3437
hostpython = sh.Command(self.ctx.hostpython)
35-
# AND: This *doesn't* need to be in arm env?
3638
shprint(hostpython, '-OO', '-m', 'compileall',
3739
self.ctx.get_python_install_dir(),
3840
_tail=10, _filterout="^Listing", _critical=True)
@@ -50,8 +52,8 @@ def run_distribute(self):
5052
shprint(sh.mkdir, '-p', join('private', 'include', 'python2.7'))
5153

5254
# AND: Copylibs stuff should go here
53-
if exists(join('libs', 'armeabi', 'libpymodules.so')):
54-
shprint(sh.mv, join('libs', 'armeabi', 'libpymodules.so'), 'private/')
55+
if exists(join('libs', arch.arch, 'libpymodules.so')):
56+
shprint(sh.mv, join('libs', arch.arch, 'libpymodules.so'), 'private/')
5557
shprint(sh.cp, join('python-install', 'include' , 'python2.7', 'pyconfig.h'), join('private', 'include', 'python2.7/'))
5658

5759
info('Removing some unwanted files')

pythonforandroid/toolchain.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2485,9 +2485,7 @@ def biglink(ctx, arch):
24852485

24862486
# AND: Shouldn't hardcode Arch! In reality need separate
24872487
# build dirs for each arch
2488-
raise ValueError('hardcoded Arch to fix!')
2489-
arch = ArchARM(ctx)
2490-
env = ArchARM(ctx).get_env()
2488+
env = arch.get_env()
24912489
env['LDFLAGS'] = env['LDFLAGS'] + ' -L{}'.format(
24922490
join(ctx.bootstrap.build_dir, 'obj', 'local', arch.arch))
24932491

0 commit comments

Comments
 (0)