Skip to content

Commit 3379ae5

Browse files
committed
unix: store disabled static modules in files
So we can maintain different sets per platform.
1 parent bb87eba commit 3379ae5

File tree

4 files changed

+17
-0
lines changed

4 files changed

+17
-0
lines changed

cpython-unix/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,7 @@ PYTHON_DEPENDS := \
235235
$(OUTDIR)/uuid-$(UUID_VERSION)-$(PLATFORM).tar \
236236
$(OUTDIR)/xz-$(XZ_VERSION)-$(PLATFORM).tar \
237237
$(OUTDIR)/zlib-$(ZLIB_VERSION)-$(PLATFORM).tar \
238+
$(HERE)/disabled-static-modules.$(BASE_PLATFORM) \
238239
$(HERE)/static-modules.$(BASE_PLATFORM) \
239240
$(NULL)
240241

cpython-unix/build.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -509,12 +509,18 @@ def build_cpython(
509509
with (SUPPORT / ("static-modules.%s" % platform)).open("rb") as fh:
510510
static_modules_lines = [l.rstrip() for l in fh if not l.startswith(b"#")]
511511

512+
with (SUPPORT / ("disabled-static-modules.%s" % platform)).open("rb") as fh:
513+
disabled_static_modules = {
514+
l.strip() for l in fh if l.strip() and not l.strip().startswith(b"#")
515+
}
516+
512517
setup = derive_setup_local(
513518
static_modules_lines,
514519
python_archive,
515520
python_version=entry["version"],
516521
musl=musl,
517522
debug=debug,
523+
disabled=disabled_static_modules,
518524
)
519525

520526
config_c_in = parse_config_c(setup["config_c_in"].decode("utf-8"))

cpython-unix/disabled-static-modules.linux64

Whitespace-only changes.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# We don't support GDBM because it is GPL v3.
2+
_gdbm
3+
# Not yet supported.
4+
_tkinter
5+
# Not available on macOS.
6+
nis
7+
# Not available on macOS.
8+
ossaudiodev
9+
# Not available on macOS.
10+
spwd

0 commit comments

Comments
 (0)