`sysconfig` provide wrong path in built cpython on windows

Abierto
#160,905 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
35/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Estancado
Stack tecnológico
python
Área
build-system

Línea de trabajo

Read _init_non_posix in Lib/sysconfig/__init__.py around line 412 and check how LIBDIR is computed for Windows Python builds. Compare that value with the directory containing sys.executable; done when the build case reports the expected path and the relevant sysconfig tests pass.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

OS-windows stdlib type-bug
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
  • gh-160906
Lenguaje dominante
Python
Estrellas
77.8k
Forks
37.7k
Merge medio
17 h 24 min
PR fusionados (30 d)
716

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de python/cpython

Todos los issues de python/cpython

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.