hatch_build.py: the package cannot be built where `file(1)` is not installed
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
- 84/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- python
- Área
- build-system
Línea de trabajo
Empieza en hatch_build.py y lee CFfiBuildHook._build_flatc, centrándote en las llamadas a subprocess de readelf y file. Prueba la compilación en un entorno Debian 13 sin file ni binutils y repítela después con ambas herramientas instaladas. Se considerará terminado cuando la compilación se complete correctamente sin ninguna de las dos herramientas de diagnóstico e imprima las líneas de diagnóstico cuando ambas estén disponibles.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
What happens
On a Debian 13 host without the file package, every install or build of autobahn
from source fails: pip install -e ., uv pip install, and just install,
install-tools, install-docs, install-build-tools, build. At master 7d6978d,
CPython 3.11 to 3.14 and PyPy 3.11 all fail the same way:
FileNotFoundError: [Errno 2] No such file or directory: 'file'
...
error: metadata-generation-failed
flatc builds successfully first; the build fails only after that.
Why
CFfiBuildHook._build_flatc prints diagnostics about the built flatc, and finishes
with:
file_result = subprocess.run(
["file", str(flatc_dest)],
capture_output=True,
text=True,
)
if file_result.returncode == 0:
print(f" {file_result.stdout.strip()}")
The code checks the return code, but subprocess.run raises before returning one
when the executable itself is missing. The output is only diagnostic, yet a missing
diagnostic tool fails the whole build. GitHub's runners have file, so CI never hits
this. Minimal containers and build hosts often lack it.
Fix
Catch FileNotFoundError around this call and skip the line, and do the same for the
readelf call just above it, which has the same shape. Alternatively, look the tool
up with shutil.which() first.
Acceptance
- In a
debian:trixiecontainer withoutfile(and withoutbinutils),pip install .builds and installs autobahn. - Where both tools are present, the diagnostic lines are printed as before.
Found by running the GH CI steps on a local build node.
- Lenguaje dominante
- Python
- Estrellas
- 2.5k
- Forks
- 766
- Merge medio
- 4 h 24 min
- PR fusionados (30 d)
- 20
Preparar el entorno
- 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 crossbario/autobahn-python
-
CI-CD enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
crossbario/autobahn-python#1945 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bug CI-CD
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
crossbario/autobahn-python#1932 ·
Los mantenedores suelen responder en 1 día
-
CI-CD enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
crossbario/autobahn-python#1829 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
crossbario/autobahn-python#2033 ·
Los mantenedores suelen responder en 1 día
-
bug CI-CD
Dificultad 4/5 3-5 días Aptitud para principiantes 52/100
crossbario/autobahn-python#2013 ·
Los mantenedores suelen responder en 1 día
Todos los issues de crossbario/autobahn-python
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
huggingface/deep-rl-class#723 ·
-
[tool] bug: Qwen3 XML tool parser raises on `...` argument values (Ellipsis is not JSON serializable)Posiblemente ocupada @super-yuki la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 87/100
verl-project/verl#8559 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
TencentCloud/octop-harness#228 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
google/osv-scalibr#2585 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
NousResearch/hermes-agent#149323 ·
Los mantenedores suelen responder en 1 día