Open touilleMan opened 1 year ago
Hey @touilleMan , were you able to resolve this issue?
I'm running into the exact same situation but on 3.11 (works fine on 3.9 and 3.10)
Error occured using pip install which I managed to fix by adjusting CONFINCLUDEPY
pointing to /install
to absolute path of that folder in _sysconfigdata_*.py
Just wondering how you manage to get it working or if there was a way to not modify CONFINCLUDEPY
.
Hi @adrian-kong ,
I've found a workaround for this issue: find by hand the actual include dir of the python distribution I want to compile against, then provide it as an additional include.
This is not perfect given the incorrect include flags a still present and can take priority if they point to a valid location :'(
The final commands setuptools runs to compile my cython extension (/tmp/godot-python-test-qzmy_izf
is the working folder, addons/pythonscript/linux-x86_64/
contains the Python distribution provided by python-build-standalone):
clang -pthread -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tools/deps/include -I/tools/deps/include/ncursesw -I/tools/deps/libedit/include -fPIC -Iaddons/pythonscript/linux-x86_64/include/python3.11 -Igdextension_api -I/install/include/python3.11 -c my.c -o build/temp.linux-x86_64-cpython-311/my.o
clang -pthread -shared -L/tools/deps/lib -Wl,--exclude-libs,ALL -L/tools/deps/libedit/lib build/temp.linux-x86_64-cpython-311/my.o -L/install/lib -o /tmp/godot-python-test-qzmy_izf/my.cpython-311-x86_64-linux-gnu.so
tl;dr: Last release
20221220
fails to compile a simple cython project:setup.py
:(
my.pyx
can be an empty file)With
20221220/cpython-3.10.9+20221220-x86_64-unknown-linux-gnu-pgo+lto-full.tar.zst
:vs with
20221106/cpython-3.10.8+20221106-x86_64-unknown-linux-gnu-pgo+lto-full.tar.zst
The issue seems to be the includes flags end up with an empty prefix path (hence e.g.
-I/install/include/python3.10
instead of-I/my/path/to/python-build-standalone/install/include/python3.10
)I'm not sure what the reason given python3-config output the correct include flags: