Building against Python development build: Missing pyconfig.h

Florian Bruhin me at the-compiler.org
Sun Aug 1 15:25:10 BST 2021


Hi,

I've tried building CPython 3.10 from git, and then building the latest
PyQt5 snapshot against it.

That is:

    PyQt-builder 1.11.0.dev2107161131
    PyQt5-sip 12.9.0
    sip 6.2.0.dev2107131757
    PyQt5 5.15.5.dev2107091435

When I do so, I get:

    gcc [...] -DQT_PLUGIN -I. -I. -I.. -I[...]/cpython/Include -I[...]/qtbase/mkspecs/linux-g++ -o sipQtcmodule.o sipQtcmodule.c
    In file included from ../sip.h:24,
                     from sipQtcmodule.c:7:
    /home/florian/tmp/cpython/Include/Python.h:8:10: fatal error: pyconfig.h: No such file or directory
        8 | #include "pyconfig.h"
          |          ^~~~~~~~~~~~
    compilation terminated.

This seems to fail because the pyconfig.h in a Python built from sources
is actually in the cpython directory (i.e. the repository root, where
the 'python' executable is too) and not the Include directory.

After a "ln -s ../pyconfig.h" in the cpython/Include directory, the
build succeeded.

Florian

-- 
            me at the-compiler.org | https://www.qutebrowser.org 
       https://bruhin.software/ | https://github.com/sponsors/The-Compiler/
       GPG: 916E B0C8 FD55 A072 | https://the-compiler.org/pubkey.asc
             I love long mails! | https://email.is-not-s.ms/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20210801/ca53f594/attachment.sig>


More information about the PyQt mailing list