[New-bugs-announce] [issue39026] pystate.h contains non-relative of initconfig.h include causing macOS Framework include failure

Gaige Paulsen report at bugs.python.org
Wed Dec 11 10:34:04 EST 2019


New submission from Gaige Paulsen <gaige at cluetrust.com>:

The cpython/pystate.h includes cpython/initconfig.h using the relative path "cpython/initconfig.h", which probably works fine if your include path explicitly contains the top of the python directory, however when developing with a framework in macOS, the framework's root path cannot be referred to relatively.

Since cpython/pystate.h and cpython/initconfig.h live in the same directory, any C compiler should include them correctly, regardless of include path if the cpython/pystate.h includes "initconfig.h" instead of "cpython/initconfig.h", since I believe the very first path is always relative to the file including the next file.  In this case, cpython is the parent of pystate.h and thus including initconfig.h directly should work fine.

Previous 3.x versions worked fine, but the cpython directory wasn't in Headers for macOS.

Although I wasn't able to exhaustively test this on all platforms and with all compilers, changing the include in cpython/pystate.h to "initconfig.h" solved the compilation/include problem.

----------
components: C API, macOS
messages: 358266
nosy: gaige, ned.deily, ronaldoussoren
priority: normal
severity: normal
status: open
title: pystate.h contains non-relative of initconfig.h include causing macOS Framework include failure
type: behavior
versions: Python 3.8

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


More information about the New-bugs-announce mailing list