Skip to content

Commit

Permalink
Fixes #219 Use sysconfig.get_config_h_filename() to locate pyconfig.h
Browse files Browse the repository at this point in the history
  • Loading branch information
zooba committed Dec 12, 2023
1 parent 35069ad commit 93d1bc5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions distutils/sysconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,12 +195,11 @@ def _get_python_inc_posix_prefix(prefix):

def _get_python_inc_nt(prefix, spec_prefix, plat_specific):
if python_build:
# Include both the include and PC dir to ensure we can find
# pyconfig.h
# Include both include dirs to ensure we can find pyconfig.h
return (
os.path.join(prefix, "include")
+ os.path.pathsep
+ os.path.join(prefix, "PC")
+ os.path.dirname(sysconfig.get_config_h_filename())
)
return os.path.join(prefix, "include")

Expand Down

0 comments on commit 93d1bc5

Please sign in to comment.