`generate-build-details.py --relative-paths --config-file-path` writes wrong paths
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
- 72/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- python
- Área
- build-system
Línea de trabajo
Empieza con Tools/build/generate-build-details.py e inspecciona make_paths_relative(), que el informe identifica como el origen de las rutas incorrectas. Reproduce el ejemplo usando --relative-paths --config-file-path y compara las rutas escritas headers, base_interpreter y libpython con las rutas relativas al prefijo absoluto. El trabajo estará terminado cuando esos valores sean correctos y no dependan del directorio desde el que se ejecute el script.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Bug report
PEP 739 says a relative base_prefix is relative to the directory that contains build-details.json, and the other paths are relative to base_prefix. With --relative-paths --config-file-path, make_paths_relative() first replaces base_prefix with a path relative to the config file's directory, such as ../... It then computes the other paths relative to that relative base_prefix instead of the absolute one, so they're wrong.
For example, for an install whose prefix is /opt/python, running this from /tmp/build:
./python Tools/build/generate-build-details.py \
/opt/python/lib/python3.16/build-details.json \
--relative-paths \
--config-file-path /opt/python/lib/python3.16/build-details.json
writes "base_prefix": "../..", which is correct, but also "headers": "./opt/python/include/python3.16" instead of ./include/python3.16. base_interpreter and the libpython paths are wrong in the same way. Because the relative base_prefix ends up resolved against the current directory, the wrong values also change with the directory the script runs from: from /Users/me/src/cpython/build, headers becomes ./../../../opt/python/include/python3.16.
see astral-sh/python-build-standalone#885 for example of how PBS deals with this issue.
CPython versions tested on:
CPython main branch
Operating systems tested on:
macOS
- Lenguaje dominante
- Python
- Estrellas
- 77.7k
- Forks
- 38.3k
- Merge medio
- 12 h 27 min
- PR fusionados (30 d)
- 645
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de python/cpython
-
tests topic-profiling type-bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
extension-modules type-bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día
-
tests topic-multiprocessing type-bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 71/100
Los mantenedores suelen responder en 1 día
-
Remove unused FVS_* macrosAbiertointerpreter-core type-feature
Dificultad 1/5 Menos de una hora Aptitud para principiantes 78/100
python/cpython#160109 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
extension-modules type-bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
python/cpython#160001 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de python/cpython
Issues similares
-
good first issue priority: low size: XS testing
Dificultad 1/5 1-3 horas Aptitud para principiantes 86/100
cubrid-lab/cubrid-mcp-server#385 ·
Los mantenedores suelen responder en 1 día
-
good first issue priority: low size: S testing
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
cubrid-lab/cubrid-cookbook-python#447 ·
Los mantenedores suelen responder en 1 día
-
Python PointcloudAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
ArduCAM/Arducam_tof_camera#125 ·
-
area:curator enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
CassioDalla/Scrinalia#150 ·
Los mantenedores suelen responder en 1 día
-
Tutorial notebook: Find the leakAbiertodocumentation good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100