[issue41880] Get Python include directories from sysconfigdata

Ben Wolsieffer report at bugs.python.org
Mon Sep 28 16:15:56 EDT 2020


New submission from Ben Wolsieffer <benwolsieffer at gmail.com>:

The distutils.sysconfig.get_python_inc() function finds headers relative to sys.base_prefix or sys.base_exec_prefix. This causes problems when cross-compiling extension modules because Python's headers are not platform independent.

Instead, get_python_inc() should use the INCLUDEPY and CONFINCLUDEPY variables from sysconfigdata to find headers. The _PYTHON_SYSCONFIGDATA_NAME environment variable can then be used to make build arch Python load sysconfigdata from host arch Python.

----------
components: Cross-Build, Distutils
messages: 377622
nosy: Alex.Willmer, benwolsieffer, dstufft, eric.araujo
priority: normal
severity: normal
status: open
title: Get Python include directories from sysconfigdata
type: enhancement
versions: Python 3.10

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


More information about the Python-bugs-list mailing list