[3.14] gh-134632: Fix `build-details.json` to use `INCLUDEPY` path (GH-134633) (#135605)
gh-134632: Fix `build-details.json` to use `INCLUDEPY` path (GH-134633)
* gh-134632: Fix `build-details.json` to use `INCLUDEPY` path
Fix ``build-details.json`` generation to use ``INCLUDEPY``, in order to
reference the ``pythonX.Y`` subdirectory of the include directory, as
required in :pep:`739`, instead of the top-level include directory.
* test_build_details: Add tests for the c_api section
* test_build_details: Expect pkgconfig for CPython unconditionally
(cherry picked from commit
0d582def34babca7417ece8a9e4e16cc2a752d44)
Co-authored-by: Michał Górny <mgorny@gentoo.org>