Skip to content

Commit e7cfada

Browse files
committed
GH-158878: Stop creating Modules/Setup.local as part of building for WASI
This makes it so the build process no longer needs to modify the source checkout itself.
1 parent 05302c0 commit e7cfada

3 files changed

Lines changed: 2 additions & 28 deletions

File tree

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Stop creating an empty Modules/Setup.local file as it no longer seems to be
2+
required to statically link the extension modules.

‎Platforms/WASI/_build.py‎

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,6 @@
2525

2626
import _shared
2727

28-
LOCAL_SETUP_MARKER = (
29-
b"# Generated by Platforms/WASI .\n"
30-
b"# Required to statically build extension modules."
31-
)
32-
3328
WASMTIME_VAR_NAME = "WASMTIME"
3429
WASMTIME_HOST_RUNNER_VAR = f"{{{WASMTIME_VAR_NAME}}}"
3530

@@ -147,18 +142,6 @@ def call(command, *, context=None, quiet=False, **kwargs):
147142
@subdir("build_python_path", clean_ok=True)
148143
def configure_build_python(context, working_dir):
149144
"""Configure the build/host Python."""
150-
if context.setup_local_path.exists():
151-
if context.setup_local_path.read_bytes() == LOCAL_SETUP_MARKER:
152-
_shared.log("👍", f"{context.setup_local_path} exists ...")
153-
else:
154-
_shared.log(
155-
"⚠️",
156-
f"{context.setup_local_path} exists, but has unexpected contents",
157-
)
158-
else:
159-
_shared.log("📝", f"Creating {context.setup_local_path} ...")
160-
context.setup_local_path.write_bytes(LOCAL_SETUP_MARKER)
161-
162145
configure = [os.path.relpath(context.checkout / "configure", working_dir)]
163146
if context.args:
164147
configure.extend(context.args)
@@ -300,13 +283,6 @@ def clean_contents(context):
300283
_shared.log("🧹", f"Deleting {context.cross_build_path} ...")
301284
shutil.rmtree(context.cross_build_path)
302285

303-
if context.setup_local_path.exists():
304-
if context.setup_local_path.read_bytes() == LOCAL_SETUP_MARKER:
305-
_shared.log(
306-
"🧹", f"Deleting generated {context.setup_local_path} ..."
307-
)
308-
context.setup_local_path.unlink()
309-
310286

311287
@subdir("build_python_path")
312288
def pythoninfo_build_python(context, working_dir):

‎Platforms/WASI/_shared.py‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,6 @@ def _pybuilddir(self, build_path):
4040
relative_dir = (build_path / "pybuilddir.txt").read_text().strip()
4141
return build_path / relative_dir
4242

43-
@functools.cached_property
44-
def setup_local_path(self):
45-
return self.checkout / "Modules" / "Setup.local"
46-
4743
@functools.cached_property
4844
def host_triple(self):
4945
if self._host_triple:

0 commit comments

Comments
 (0)