-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
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
base: main
Are you sure you want to change the base?
Conversation
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.
CC @FFY00 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
reference the ``pythonX.Y`` subdirectory of the include directory, as | ||
required in :pep:`739`, instead of the top-level include directory. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If required by the PEP, we should have a test enforcing this contract?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you have anything specific in mind? Checking that the value in the generated build-details.json
ends with pythonX.Y
specifically, or something deeper?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added a test that checks that the values of c_api.include
and c_api.pkgconfig_path
(if present) point to valid directories with necessary files.
Gentle ping. |
There was a problem hiding this 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
: usesINCLUDEPY
, does not useINCLUDEDIR
meson
/meson-python
: usesINCLUDEPY
, does not useINCLUDEDIR
cmake
/scikit-build-core
: does not use either of the twomaturin
: does not use either of the two
Can this please be merged and backported to 3.14-beta?
Fix
build-details.json
generation to useINCLUDEPY
, in order to reference thepythonX.Y
subdirectory of the include directory, as required in PEP-0739, instead of the top-level include directory.build-details.json
:c_api.headers
does not include thepythonX.Y
directory #134632