From 107495564158ad9d9ffe35f3e80d682bb029023f Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Wed, 8 Apr 2026 15:22:16 +0800 Subject: [PATCH 1/6] Add compatibility shim for Platform/Android builds. --- master/custom/factories.py | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/master/custom/factories.py b/master/custom/factories.py index ce4a25af..366e4a76 100644 --- a/master/custom/factories.py +++ b/master/custom/factories.py @@ -1273,8 +1273,20 @@ class AndroidBuild(BaseBuild): """ def setup(self, **kwargs): - android_py = "Android/android.py" + android_py = ["python3", "Platforms/Android"] self.addSteps([ + # This symlink is needed to support pre Python 3.15 builds - it makes the + # top level Andrdoid folder appear in the new Platforms/Android location, + # and links `__main__.py` to the older `android.py` script. This step can + # be removed when 3.14 is no longer supported. + ShellCommand( + name="Set up compatibility symlink", + command=( + "[ -e Platforms/Android ]" + "|| ln -s ../Android Platforms/Android" + "&& ln -si ../Android/android.py Platforms/Android/__main__.py" + ), + ), SetPropertyFromCommand( name="Get build triple", command=["./config.guess"], @@ -1283,24 +1295,22 @@ def setup(self, **kwargs): ), Configure( name="Configure build Python", - command=[android_py, "configure-build"], + command=android_py + ["configure-build"], ), Compile( name="Compile build Python", - command=[android_py, "make-build"], + command=android_py + ["make-build"], ), Configure( name="Configure host Python", - command=[android_py, "configure-host", self.host_triple], + command=android_py + ["configure-host", self.host_triple], ), Compile( name="Compile host Python", - command=[android_py, "make-host", self.host_triple], + command=android_py + ["make-host", self.host_triple], ), Test( - command=[ - android_py, "test", "--managed", "maxVersion", "-v", "--slow-ci" - ], + command=android_py + ["test", "--managed", "maxVersion", "-v", "--slow-ci"], timeout=step_timeout(self.test_timeout), ), ]) From 3082267c42842d298fd4041a88f5a4bffcb54561 Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Wed, 8 Apr 2026 15:22:53 +0800 Subject: [PATCH 2/6] Updates for consistency with Platforms/Apple. --- master/custom/factories.py | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/master/custom/factories.py b/master/custom/factories.py index 366e4a76..fa6ef8e6 100644 --- a/master/custom/factories.py +++ b/master/custom/factories.py @@ -1185,10 +1185,7 @@ def py313_setup(self, branch, worker, test_with_PTY=False, **kwargs): ) def current_setup(self, branch, worker, test_with_PTY=False, **kwargs): - build_environ = { - "CACHE_DIR": "/Users/buildbot/downloads", - } - + apple_py = ["python3", "Platforms/Apple"] self.addSteps([ # This symlink is needed to support Python 3.14 builds - it makes the # top level Apple folder appear in the new Platforms/Apple location. @@ -1202,18 +1199,15 @@ def current_setup(self, branch, worker, test_with_PTY=False, **kwargs): # Build the full iOS XCframework, including a multi-arch simulator slice. Compile( name="Configure and compile build Python", - command=["python3", "Platforms/Apple", "build", "iOS", "build"], - env=build_environ, + command=apple_py + ["build", "iOS", "build"], ), Compile( name="Configure and compile host Pythons", - command=["python3", "Platforms/Apple", "build", "iOS", "hosts"], - env=build_environ, + command=apple_py + ["build", "iOS", "hosts"], ), Compile( name="Package XCframework", - command=["python3", "Platforms/Apple", "package", "iOS"], - env=build_environ, + command=apple_py + ["package", "iOS"], ), Test( name="Run test suite", @@ -1224,13 +1218,11 @@ def current_setup(self, branch, worker, test_with_PTY=False, **kwargs): "iOS", "--slow-ci", ], - env=build_environ, timeout=step_timeout(self.test_timeout), ), Clean( name="Clean the builds", - command=["python3", "Platforms/Apple", "clean", "iOS"], - env=build_environ, + command=apple_py + ["clean", "iOS"], ), ]) From 304532b1f90c0d79f2d1a472d6eb48f6bbcea97d Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Thu, 9 Apr 2026 06:34:39 +0800 Subject: [PATCH 3/6] Formatting tweaks for compat symlinks. --- master/custom/factories.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/master/custom/factories.py b/master/custom/factories.py index fa6ef8e6..da46b3be 100644 --- a/master/custom/factories.py +++ b/master/custom/factories.py @@ -1194,7 +1194,10 @@ def current_setup(self, branch, worker, test_with_PTY=False, **kwargs): # supported. ShellCommand( name="Set up compatibility symlink", - command="[ -e Platforms/Apple ] || ln -s ../Apple Platforms/Apple", + command=( + "[ -e Platforms/Apple ] " + "|| ln -s ../Apple Platforms/Apple" + ), ), # Build the full iOS XCframework, including a multi-arch simulator slice. Compile( @@ -1268,14 +1271,15 @@ def setup(self, **kwargs): android_py = ["python3", "Platforms/Android"] self.addSteps([ # This symlink is needed to support pre Python 3.15 builds - it makes the - # top level Andrdoid folder appear in the new Platforms/Android location, + # top level Android folder appear in the new Platforms/Android location, # and links `__main__.py` to the older `android.py` script. This step can # be removed when 3.14 is no longer supported. ShellCommand( name="Set up compatibility symlink", command=( - "[ -e Platforms/Android ]" - "|| ln -s ../Android Platforms/Android" + "[ -e Platforms/Android ] " + "|| mkdir -p Platforms " + "&& ln -s ../Android Platforms/Android " "&& ln -si ../Android/android.py Platforms/Android/__main__.py" ), ), From 914ca5ae0fc7a1983fec4cc477d915815445773e Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Thu, 9 Apr 2026 07:28:53 +0800 Subject: [PATCH 4/6] Remove stray -i --- master/custom/factories.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/master/custom/factories.py b/master/custom/factories.py index da46b3be..38a192c5 100644 --- a/master/custom/factories.py +++ b/master/custom/factories.py @@ -1280,7 +1280,7 @@ def setup(self, **kwargs): "[ -e Platforms/Android ] " "|| mkdir -p Platforms " "&& ln -s ../Android Platforms/Android " - "&& ln -si ../Android/android.py Platforms/Android/__main__.py" + "&& ln -s ../Android/android.py Platforms/Android/__main__.py" ), ), SetPropertyFromCommand( From 7325608d4f660e0c856ab3025c23414254131825 Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Thu, 9 Apr 2026 07:34:42 +0800 Subject: [PATCH 5/6] Use if rather than and/or. --- master/custom/factories.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/master/custom/factories.py b/master/custom/factories.py index 38a192c5..400ac65b 100644 --- a/master/custom/factories.py +++ b/master/custom/factories.py @@ -1195,8 +1195,9 @@ def current_setup(self, branch, worker, test_with_PTY=False, **kwargs): ShellCommand( name="Set up compatibility symlink", command=( - "[ -e Platforms/Apple ] " - "|| ln -s ../Apple Platforms/Apple" + "if [ ! -e Platforms/Apple ]; then" + " ln -s ../Apple Platforms/Apple; " + "fi" ), ), # Build the full iOS XCframework, including a multi-arch simulator slice. @@ -1277,10 +1278,11 @@ def setup(self, **kwargs): ShellCommand( name="Set up compatibility symlink", command=( - "[ -e Platforms/Android ] " - "|| mkdir -p Platforms " - "&& ln -s ../Android Platforms/Android " - "&& ln -s ../Android/android.py Platforms/Android/__main__.py" + "if [ ! -e Platforms/Android ]; then" + " mkdir -p Platforms;" + " ln -s ../Android Platforms/Android;" + " ln -s ../Android/android.py Platforms/Android/__main__.py; " + "fi" ), ), SetPropertyFromCommand( From 389b08dfb21e93a2d5cc6d6dcab9eb026c2f5b9e Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Thu, 9 Apr 2026 14:34:46 +0800 Subject: [PATCH 6/6] Simplify the symlink path. --- master/custom/factories.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/master/custom/factories.py b/master/custom/factories.py index 400ac65b..0b181c12 100644 --- a/master/custom/factories.py +++ b/master/custom/factories.py @@ -1281,7 +1281,7 @@ def setup(self, **kwargs): "if [ ! -e Platforms/Android ]; then" " mkdir -p Platforms;" " ln -s ../Android Platforms/Android;" - " ln -s ../Android/android.py Platforms/Android/__main__.py; " + " ln -s ./android.py Platforms/Android/__main__.py; " "fi" ), ),