Skip to content

Commit 9e32389

Browse files
committed
Support multiarch in webview bootstrap
This is essentially exactly the same as what the sdl2 bootstrap is doing.
1 parent c9c91e8 commit 9e32389

File tree

1 file changed

+11
-14
lines changed

1 file changed

+11
-14
lines changed

pythonforandroid/bootstraps/webview/__init__.py

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,31 +21,28 @@ def assemble_distribution(self):
2121
with open('local.properties', 'w') as fileh:
2222
fileh.write('sdk.dir={}'.format(self.ctx.sdk_dir))
2323

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))
28-
2924
with current_directory(self.dist_dir):
3025
info('Copying python distribution')
3126

32-
self.distribute_libs(arch, [self.ctx.get_libs_dir(arch.arch)])
33-
self.distribute_aars(arch)
3427
self.distribute_javaclasses(self.ctx.javaclass_dir,
3528
dest_dir=join("src", "main", "java"))
3629

37-
python_bundle_dir = join(f'_python_bundle__{arch.arch}', '_python_bundle')
38-
ensure_dir(python_bundle_dir)
39-
site_packages_dir = self.ctx.python_recipe.create_python_bundle(
40-
join(self.dist_dir, python_bundle_dir), arch)
30+
for arch in self.ctx.archs:
31+
self.distribute_libs(arch, [self.ctx.get_libs_dir(arch.arch)])
32+
self.distribute_aars(arch)
33+
34+
python_bundle_dir = join(f'_python_bundle__{arch.arch}', '_python_bundle')
35+
ensure_dir(python_bundle_dir)
36+
site_packages_dir = self.ctx.python_recipe.create_python_bundle(
37+
join(self.dist_dir, python_bundle_dir), arch)
38+
if not self.ctx.with_debug_symbols:
39+
self.strip_libraries(arch)
40+
self.fry_eggs(site_packages_dir)
4141

4242
if 'sqlite3' not in self.ctx.recipe_build_order:
4343
with open('blacklist.txt', 'a') as fileh:
4444
fileh.write('\nsqlite3/*\nlib-dynload/_sqlite3.so\n')
4545

46-
if not self.ctx.with_debug_symbols:
47-
self.strip_libraries(arch)
48-
self.fry_eggs(site_packages_dir)
4946
super().assemble_distribution()
5047

5148

0 commit comments

Comments
 (0)