Skip to content

Commit bdae884

Browse files
committed
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.
1 parent 2fd09b0 commit bdae884

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Fixed ``build-details.json`` generation to use ``INCLUDEPY``, in order to
2+
reference the ``pythonX.Y`` subdirectory of the include directory, as
3+
required in :pep:`739`, instead of the top-level include directory.

Tools/build/generate-build-details.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def generate_data(schema_version: str) -> collections.defaultdict[str, Any]:
7575
PY3LIBRARY = sysconfig.get_config_var('PY3LIBRARY')
7676
LIBPYTHON = sysconfig.get_config_var('LIBPYTHON')
7777
LIBPC = sysconfig.get_config_var('LIBPC')
78-
INCLUDEDIR = sysconfig.get_config_var('INCLUDEDIR')
78+
INCLUDEPY = sysconfig.get_config_var('INCLUDEPY')
7979

8080
if os.name == 'posix':
8181
# On POSIX, LIBRARY is always the static library, while LDLIBRARY is the
@@ -123,7 +123,7 @@ def generate_data(schema_version: str) -> collections.defaultdict[str, Any]:
123123
if has_static_library:
124124
data['libpython']['static'] = os.path.join(LIBDIR, LIBRARY)
125125

126-
data['c_api']['headers'] = INCLUDEDIR
126+
data['c_api']['headers'] = INCLUDEPY
127127
if LIBPC:
128128
data['c_api']['pkgconfig_path'] = LIBPC
129129

0 commit comments

Comments
 (0)