Skip to content

sysconfig provide wrong path in built cpython on windows #160905

Open

Description

@Locked-chess-official

Bug report

I'm sure that in _init_non_posix this will be wrong when in python build:

https://github.com/python/cpython/blob/main/Lib/sysconfig/__init__.py#L412

In python build, this value is just the folder where the sys.executable in. Change it to:

    if not _PYTHON_BUILD:
        vars['LIBDIR'] = _safe_realpath(os.path.join(get_config_var('installed_base'), 'libs'))
    else:
        vars['LIBDIR'] = os.path.dirname(
            _safe_realpath(sys.executable)
        )

CPython versions tested on:

CPython main branch

Operating systems tested on:

Windows

Linked PRs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    OS-windowsstdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions