Skip to content

Commit dbf6b2f

Browse files
committed
[dist] Change bootstrap build dir
To avoid conflicts when we reuse a dist with a different arch. The same name convention used for standard recipe builds has been used, but contemplating all the ctx.archs (because ndk builds are supposed to support multi arch builds). So an bootstrap build folder would look like as: - armeabi-v7a_arm64-v8a__ndk_target_21 - arm64-v8a__ndk_target_21 ...
1 parent 59a3747 commit dbf6b2f

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

pythonforandroid/bootstrap.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,15 @@ def get_build_dir_name(self):
126126
return dir_name
127127

128128
def get_build_dir(self):
129-
return join(self.ctx.build_dir, 'bootstrap_builds', self.get_build_dir_name())
129+
return join(
130+
self.ctx.build_dir,
131+
'bootstrap_builds',
132+
self.get_build_dir_name(),
133+
'{}__ndk_target_{}'.format(
134+
'_'.join(arch.arch for arch in self.ctx.archs),
135+
self.ctx.ndk_api,
136+
),
137+
)
130138

131139
def get_dist_dir(self, name):
132140
return join(self.ctx.dist_dir, name)

tests/test_bootstrap.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,10 @@ def test_build_dist_dirs(self):
9999
bs = Bootstrap.get_bootstrap("sdl2", self.ctx)
100100

101101
self.assertTrue(
102-
bs.get_build_dir().endswith("build/bootstrap_builds/sdl2-python3")
102+
bs.get_build_dir().endswith(
103+
"build/bootstrap_builds/sdl2-python3/"
104+
"armeabi_armeabi-v7a_x86_x86_64_arm64-v8a__ndk_target_21"
105+
)
103106
)
104107
self.assertTrue(bs.get_dist_dir("test_prj").endswith("dists/test_prj"))
105108
self.assertTrue(

0 commit comments

Comments
 (0)