mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03:00
gh-86179: Implement realpath() on Windows for getpath.py calculations (GH-113033)
This commit is contained in:
parent
41c18aacc7
commit
fddc829236
4 changed files with 63 additions and 11 deletions
|
|
@ -404,16 +404,7 @@ def get_config_h_filename():
|
|||
"""Return the path of pyconfig.h."""
|
||||
if _PYTHON_BUILD:
|
||||
if os.name == "nt":
|
||||
# This ought to be as simple as dirname(sys._base_executable), but
|
||||
# if a venv uses symlinks to a build in the source tree, then this
|
||||
# fails. So instead we guess the subdirectory name from sys.winver
|
||||
if sys.winver.endswith('-32'):
|
||||
arch = 'win32'
|
||||
elif sys.winver.endswith('-arm64'):
|
||||
arch = 'arm64'
|
||||
else:
|
||||
arch = 'amd64'
|
||||
inc_dir = os.path.join(_PROJECT_BASE, 'PCbuild', arch)
|
||||
inc_dir = os.path.dirname(sys._base_executable)
|
||||
else:
|
||||
inc_dir = _PROJECT_BASE
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue