Lets make `zlib` required rather than optional to build CPython

Correct. I do propose to ignore that motivation, and replace it with:

1 Like

Embedding is a reasonable reason to want to exclude zlib, and I’d argue more realistic than some hypothetical bootstrapping environment.

But I’m okay with the default behaviour being to fail if you don’t have it, and require an explicit option to continue without. Perhaps it’s a good opportunity to ensure all references to it are in one place (presumably zlibmodule.c?) and that module is the only thing included/excluded. We ought to be able to relatively easily turn builtin modules on and off in very few locations.

1 Like

It’s because I haven’t gotten around to setting everything up to do the static build from our source copies of zlib to then compile in the resulting .o file when building Python (i.e. WASI doesn’t have OS package maintainers building zlib for us, just me :wink:).

And I’m fine not giving WASI an exemption once I have enough time to get zlib building via Tools/wasm/wasi.py.

1 Like

FYI this is now written up as a PEP with its own discussion thread: PEP 775: Make zlib required to build CPython

1 Like