From db4c824cdf912eaf7b27d553370326e91925ec7e Mon Sep 17 00:00:00 2001 From: Hood Chatham Date: Tue, 22 Jul 2025 15:07:17 +0200 Subject: [PATCH 1/4] Add Emscripten libmpdec build step Goes together with: https://github.com/python/cpython/pull/136997 --- master/custom/factories.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/master/custom/factories.py b/master/custom/factories.py index 3b77ee37..194e92e0 100644 --- a/master/custom/factories.py +++ b/master/custom/factories.py @@ -1365,10 +1365,15 @@ def setup(self, **kwargs): env=compile_environ, ), Compile( - name="Compile host libFFI", + name="Compile host libffi", command=["python3", "Tools/wasm/emscripten", "make-libffi"], env=compile_environ, ), + Compile( + name="Compile host libmpdecimal", + command=["python3", "Tools/wasm/emscripten", "make-mpdec"], + env=compile_environ, + ), Configure( name="Configure host Python", command=["python3", "Tools/wasm/emscripten", "configure-host"], From ca15617fe5925c6fecdc86c5c92f75a1ecc35d09 Mon Sep 17 00:00:00 2001 From: Hood Chatham Date: Tue, 22 Jul 2025 15:12:00 +0200 Subject: [PATCH 2/4] Update name --- 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 194e92e0..8aa03e74 100644 --- a/master/custom/factories.py +++ b/master/custom/factories.py @@ -1370,7 +1370,7 @@ def setup(self, **kwargs): env=compile_environ, ), Compile( - name="Compile host libmpdecimal", + name="Compile host libmpdec", command=["python3", "Tools/wasm/emscripten", "make-mpdec"], env=compile_environ, ), From a27172fb924d040629ed637cbe816963f67e35d7 Mon Sep 17 00:00:00 2001 From: Hood Chatham Date: Thu, 24 Jul 2025 10:26:04 +0200 Subject: [PATCH 3/4] Make new step conditional on not 3.14 --- master/custom/factories.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/master/custom/factories.py b/master/custom/factories.py index 8aa03e74..4a92c8f6 100644 --- a/master/custom/factories.py +++ b/master/custom/factories.py @@ -1339,7 +1339,7 @@ class EmscriptenBuild(BaseBuild): buildersuffix = ".emscripten" factory_tags = ["emscripten"] - def setup(self, **kwargs): + def setup(self, *, branch, **kwargs): compile_environ = { "PATH": os.pathsep.join([ "/home/emscripten/emsdk", @@ -1369,11 +1369,17 @@ def setup(self, **kwargs): command=["python3", "Tools/wasm/emscripten", "make-libffi"], env=compile_environ, ), - Compile( - name="Compile host libmpdec", - command=["python3", "Tools/wasm/emscripten", "make-mpdec"], - env=compile_environ, - ), + ]) + if branch != '3.14': + # Can enable on 3.14 if/when python/cpython#161845 is merged + self.addStep( + Compile( + name="Compile host libmpdec", + command=["python3", "Tools/wasm/emscripten", "make-mpdec"], + env=compile_environ, + ) + ) + self.addSteps([ Configure( name="Configure host Python", command=["python3", "Tools/wasm/emscripten", "configure-host"], From ccad77be386cc840ae21835a337a6be03a0cb067 Mon Sep 17 00:00:00 2001 From: Hood Chatham Date: Thu, 24 Jul 2025 11:56:48 +0200 Subject: [PATCH 4/4] Update master/custom/factories.py Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com> --- 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 4a92c8f6..c1263ecf 100644 --- a/master/custom/factories.py +++ b/master/custom/factories.py @@ -1371,7 +1371,7 @@ def setup(self, *, branch, **kwargs): ), ]) if branch != '3.14': - # Can enable on 3.14 if/when python/cpython#161845 is merged + # Can enable on 3.14 if/when python/cpython#137066 is merged self.addStep( Compile( name="Compile host libmpdec",