Skip to content

gh-134632: Fix build-details.json to use INCLUDEPY path #134633

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 17, 2025

Conversation

mgorny
Copy link
Contributor

@mgorny mgorny commented May 24, 2025

Fix build-details.json generation to use INCLUDEPY, in order to reference the pythonX.Y subdirectory of the include directory, as required in PEP-0739, instead of the top-level include directory.

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.
@mgorny
Copy link
Contributor Author

mgorny commented May 24, 2025

CC @FFY00

Copy link
Contributor

@sharktide sharktide left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@ZeroIntensity ZeroIntensity added build The build process and cross-build needs backport to 3.14 bugs and security fixes labels May 25, 2025
@mgorny
Copy link
Contributor Author

mgorny commented Jun 3, 2025

Gentle ping.

Copy link
Contributor

@rgommers rgommers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @mgorny. This seems clearly correct, and matches what the PEP says.

For completeness, I searched the most popular build backends for usage (not that there's potential backwards compat impact, because build-details.json is brand new, but just to illustrate what the useful variable is):

  • setuptools: uses INCLUDEPY, does not use INCLUDEDIR
  • meson/meson-python: uses INCLUDEPY, does not use INCLUDEDIR
  • cmake/scikit-build-core: does not use either of the two
  • maturin: does not use either of the two

Can this please be merged and backported to 3.14-beta?

Copy link
Member

@FFY00 FFY00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @mgorny for the fix!

@FFY00 FFY00 enabled auto-merge (squash) June 17, 2025 08:04
@FFY00 FFY00 merged commit 0d582de into python:main Jun 17, 2025
51 checks passed
@miss-islington-app
Copy link

Thanks @mgorny for the PR, and @FFY00 for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 17, 2025
…thonGH-134633)

* pythongh-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 0d582de)

Co-authored-by: Michał Górny <[email protected]>
@bedevere-app
Copy link

bedevere-app bot commented Jun 17, 2025

GH-135605 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.14 bugs and security fixes label Jun 17, 2025
@FFY00 FFY00 added the needs backport to 3.14 bugs and security fixes label Jun 17, 2025
@miss-islington-app
Copy link

Thanks @mgorny for the PR, and @FFY00 for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 17, 2025
…thonGH-134633)

* pythongh-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 0d582de)

Co-authored-by: Michał Górny <[email protected]>
@miss-islington-app
Copy link

Sorry @mgorny and @FFY00, I had trouble completing the backport.
Please retry by removing and re-adding the "needs backport to 3.14" label.
Please backport backport using cherry_picker on the command line.

cherry_picker 0d582def34babca7417ece8a9e4e16cc2a752d44 3.14

FFY00 pushed a commit that referenced this pull request Jun 17, 2025
…H-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 0d582de)

Co-authored-by: Michał Górny <[email protected]>
capomichael1

This comment was marked as spam.

lkollar pushed a commit to lkollar/cpython that referenced this pull request Jun 19, 2025
…thon#134633)

* pythongh-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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build The build process and cross-build needs backport to 3.14 bugs and security fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants