Skip to content

Commit 1074955

Browse files
committed
Add compatibility shim for Platform/Android builds.
1 parent 49b353c commit 1074955

File tree

1 file changed

+18
-8
lines changed

1 file changed

+18
-8
lines changed

master/custom/factories.py

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1273,8 +1273,20 @@ class AndroidBuild(BaseBuild):
12731273
"""
12741274

12751275
def setup(self, **kwargs):
1276-
android_py = "Android/android.py"
1276+
android_py = ["python3", "Platforms/Android"]
12771277
self.addSteps([
1278+
# This symlink is needed to support pre Python 3.15 builds - it makes the
1279+
# top level Andrdoid folder appear in the new Platforms/Android location,
1280+
# and links `__main__.py` to the older `android.py` script. This step can
1281+
# be removed when 3.14 is no longer supported.
1282+
ShellCommand(
1283+
name="Set up compatibility symlink",
1284+
command=(
1285+
"[ -e Platforms/Android ]"
1286+
"|| ln -s ../Android Platforms/Android"
1287+
"&& ln -si ../Android/android.py Platforms/Android/__main__.py"
1288+
),
1289+
),
12781290
SetPropertyFromCommand(
12791291
name="Get build triple",
12801292
command=["./config.guess"],
@@ -1283,24 +1295,22 @@ def setup(self, **kwargs):
12831295
),
12841296
Configure(
12851297
name="Configure build Python",
1286-
command=[android_py, "configure-build"],
1298+
command=android_py + ["configure-build"],
12871299
),
12881300
Compile(
12891301
name="Compile build Python",
1290-
command=[android_py, "make-build"],
1302+
command=android_py + ["make-build"],
12911303
),
12921304
Configure(
12931305
name="Configure host Python",
1294-
command=[android_py, "configure-host", self.host_triple],
1306+
command=android_py + ["configure-host", self.host_triple],
12951307
),
12961308
Compile(
12971309
name="Compile host Python",
1298-
command=[android_py, "make-host", self.host_triple],
1310+
command=android_py + ["make-host", self.host_triple],
12991311
),
13001312
Test(
1301-
command=[
1302-
android_py, "test", "--managed", "maxVersion", "-v", "--slow-ci"
1303-
],
1313+
command=android_py + ["test", "--managed", "maxVersion", "-v", "--slow-ci"],
13041314
timeout=step_timeout(self.test_timeout),
13051315
),
13061316
])

0 commit comments

Comments
 (0)