bpo-45573: Use pkg-config for Modules/Setup by tiran · Pull Request #29164 · python/cpython

``makesetup`` puts shared extensions into ``Modules/`` directory. Create
symlinks from pybuilddir so the extensions can be imported.

Note: It is not possible to use the content of pybuilddir.txt as a build
target. Makefile evaluates target variables in the first pass. The
pybuilddir.txt file does not exist at that point.

Signed-off-by: Christian Heimes <christian@python.org>
Use pkg-config and a modified version of
``PKG_HAVE_DEFINE_WITH_MODULES`` to detect compiler flags and libraries
for ``Modules/Setup``.

For now CPython does not use any of the new flags in setup.py. We may
expand the use of pkg-config once we are sure that it works properly on
our target platforms.

Signed-off-by: Christian Heimes <christian@python.org>

@tiran

@tiran

@tiran

@tiran

@tiran tiran mentioned this pull request

Jan 22, 2023