Skip to content

Commit d0a6889

Browse files
committed
unix: make static-modules filename dependent on target platform
And install a static-modules.macos file to eventually unblock building on macOS.
1 parent 6b3523d commit d0a6889

File tree

4 files changed

+36
-2
lines changed

4 files changed

+36
-2
lines changed

cpython-unix/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ PYTHON_DEPENDS := \
225225
$(OUTDIR)/uuid-$(UUID_VERSION)-$(PLATFORM).tar \
226226
$(OUTDIR)/xz-$(XZ_VERSION)-$(PLATFORM).tar \
227227
$(OUTDIR)/zlib-$(ZLIB_VERSION)-$(PLATFORM).tar \
228-
$(HERE)/static-modules \
228+
$(HERE)/static-modules.$(BASE_PLATFORM) \
229229
$(NULL)
230230

231231
ifdef PYBUILD_LIBRESSL

cpython-unix/build.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,7 @@ def build_cpython(
505505
setuptools_archive = download_entry("setuptools", DOWNLOADS_PATH)
506506
pip_archive = download_entry("pip", DOWNLOADS_PATH)
507507

508-
with (SUPPORT / "static-modules").open("rb") as fh:
508+
with (SUPPORT / ("static-modules.%s" % platform)).open("rb") as fh:
509509
static_modules_lines = [l.rstrip() for l in fh if not l.startswith(b"#")]
510510

511511
setup = derive_setup_local(
File renamed without changes.

cpython-unix/static-modules.macos

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Setup.dist doesn't have entries for all modules. This file defines
2+
# what's missing. The content here is reconstructed from logic in
3+
# setup.py and what was observed to execute in a normal build via setup.py.
4+
# We should audit this every time we upgrade CPython.
5+
6+
_bz2 _bz2module.c -lbz2
7+
_crypt _cryptmodule.c
8+
_curses _cursesmodule.c -lncurses
9+
_curses_panel _curses_panel.c -lpanel -lncurses
10+
_ctypes _ctypes/_ctypes.c _ctypes/callbacks.c _ctypes/callproc.c _ctypes/darwin/dlfcn_simple.c _ctypes/malloc_closure.c _ctypes/stgdict.c _ctypes/cfield.c -DMACOSX -I_ctypes/darwin -lffi -ldl
11+
_ctypes_test _ctypes/_ctypes_test.c -lm
12+
_decimal _decimal/_decimal.c _decimal/libmpdec/basearith.c _decimal/libmpdec/constants.c _decimal/libmpdec/context.c _decimal/libmpdec/convolute.c _decimal/libmpdec/crt.c _decimal/libmpdec/difradix2.c _decimal/libmpdec/fnt.c _decimal/libmpdec/fourstep.c _decimal/libmpdec/io.c _decimal/libmpdec/memory.c _decimal/libmpdec/mpdecimal.c _decimal/libmpdec/numbertheory.c _decimal/libmpdec/sixstep.c _decimal/libmpdec/transpose.c -DUNIVERSAL=1 -IModules/_decimal/libmpdec
13+
_dbm _dbmmodule.c -DHAVE_BERKDB_H -DDB_DBM_HSEARCH -ldb
14+
_elementtree _elementtree.c -DHAVE_EXPAT_CONFIG_H=1 -DXML_POOR_ENTROPY=1 -DUSE_PYEXPAT_CAPI -IModules/expat
15+
_hashlib _hashopenssl.c -lssl -lcrypto
16+
_json _json.c
17+
_lsprof _lsprof.c rotatingtree.c
18+
_lzma _lzmamodule.c -llzma
19+
# TODO check setup.py logic for semaphore.c and possibly fix missing
20+
# dependency.
21+
_multiprocessing _multiprocessing/multiprocessing.c _multiprocessing/semaphore.c
22+
_opcode _opcode.c
23+
_queue _queuemodule.c
24+
_scproxy _scproxy.c -framework SystemConfiguration -framework CoreFoundation
25+
_sqlite3 _sqlite/cache.c _sqlite/connection.c _sqlite/cursor.c _sqlite/microprotocols.c _sqlite/module.c _sqlite/prepare_protocol.c _sqlite/row.c _sqlite/statement.c _sqlite/util.c -IModules/_sqlite -DMODULE_NAME=\"sqlite3\" -DSQLITE_OMIT_LOAD_EXTENSION=1 -lsqlite3
26+
_ssl _ssl.c -lssl -lcrypto
27+
_testbuffer _testbuffer.c
28+
_testimportmultiple _testimportmultiple.c
29+
_testmultiphase _testmultiphase.c
30+
_uuid _uuidmodule.c -luuid
31+
_xxtestfuzz _xxtestfuzz/_xxtestfuzz.c _xxtestfuzz/fuzzer.c
32+
pyexpat pyexpat.c expat/xmlparse.c expat/xmlrole.c expat/xmltok.c -DHAVE_EXPAT_CONFIG_H=1 -DXML_POOR_ENTROPY=1 -DUSE_PYEXPAT_CAPI -IModules/expat
33+
readline readline.c -ledit -lncurses
34+
xxlimited xxlimited.c -DPy_LIMITED_API=0x03050000

0 commit comments

Comments
 (0)