[issue43974] setup.py should set Py_BUILD_CORE_MODULE as defined macro

Christian Heimes report at bugs.python.org
Thu Apr 29 05:02:26 EDT 2021


New submission from Christian Heimes <lists at cheimes.de>:

CPython's setup.py contains lots of

  extra_compile_args = ['-DPy_BUILD_CORE_MODULE']

to mark modules as core module. Extra compiler args is the wrong option. It's also tedious and err-prone to define the macro in each and every Extension() class instance.

The compiler flag should be set automatically for all core extensions and it should use be set using the correct option define_macros.

----------
assignee: christian.heimes
components: Build
messages: 392293
nosy: christian.heimes, pablogsal, vstinner
priority: normal
severity: normal
status: open
title: setup.py should set Py_BUILD_CORE_MODULE as defined macro
type: behavior
versions: Python 3.10, Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43974>
_______________________________________


More information about the Python-bugs-list mailing list