The makesetup script is responsible for creating the Makefile
for Python 2.7 and is especially relevant when modules are added to Modules/Setup
. See https://github.com/python/cpython/blob/2.7/Modules/Setup.dist#L13-L25 for details.
The usage notes has a note which explains how modules are defined: each on a line in the format <module> ... [<sourcefile> ...] [<cpparg> ...] [<library> ...]
. Pay special attention to <cpparg> is anything starting with -I, -D, -U or -C
. This means -I/build/zlib-1.2.3
or -DUSE_GLIBC
or whatnot.
Here is an example:
pyexpat expat/xmlparse.c expat/xmlrole.c expat/xmltok.c pyexpat.c -I$(srcdir)/Modules/expat -DHAVE_EXPAT_CONFIG_H -DUSE_PYEXPAT_CAPI -DHAVE_SYSCALL_GETRANDOM
The bug happens with makesetup
's assumptions about the data appearing in the Setup
files: