Install test: wheel_modules and wheel_names ignore <dist>.data/purelib and platlib, which pip installs into site-packages
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 66/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- python
- Área
- build-system
Línea de trabajo
Start with wheel_modules() and wheel_names() in scripts/build_lab.py, whose list comprehension skips every top-level .data folder, and with the WheelModules tests in tests/test_gap_wheels.py. Add one shared helper that maps <name>.data/purelib/REST and <name>.data/platlib/REST to REST, and check native_libraries() and has_libs_folder() in scripts/gap_wheels.py. Done when the new layout tests pass, scripts/headers stay ignored, and uvx --python 3.14 [email protected] passes offline.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
The install test decides what to import from a wheel by reading its file names (wheel_modules() in scripts/build_lab.py), and decides whether a missing module is the wheel's own or a dependency's with wheel_names(). Both skip every top-level folder whose name ends in .data:
entries = [e for e in z.namelist() if not e.split("/", 1)[0].endswith((".dist-info", ".data"))]
But a wheel's <name>-<version>.data/purelib/ and .data/platlib/ folders are installed into site-packages, exactly like files at the wheel's root (the wheel spec's "data directory" section). A wheel that ships its package there looks empty to both helpers:
demo-1.0.data/platlib/demo/__init__.py
demo-1.0.data/platlib/demo/_speed.cpython-314-x86_64-linux-gnu.so
demo-1.0.dist-info/METADATA
wheel_modules() returns ([], [], 0): nothing to import and zero extension modules. The wheel's modules wouldn't be imported by the install test, or counted as the wheel's own when one is missing. #35 pinned today's behaviour in test_dist_info_and_data_folders_are_ignored_by_both and flagged it as wrong.
No published wheel is laid out this way today. Wheels built with some backends for some projects are, and the test that guards publishing shouldn't have a blind spot shaped like a wheel layout.
Where
scripts/build_lab.py: wheel_modules() and wheel_names(). Tests: WheelModules in tests/test_gap_wheels.py.
What to do
- In both helpers, treat
<anything>.data/purelib/RESTand<anything>.data/platlib/RESTasREST(strip the two leading parts), then apply the same rules as for root files. Other.datasubfolders (scripts,headers,data) are not importable and stay ignored. - Share one small function for "the site-packages path of a wheel member, or None" between the two helpers, so they can't disagree.
native_libraries()andhas_libs_folder()inscripts/gap_wheels.pyread member names too. Check whether they need the same mapping and say what you found in the PR; change them only with a test.- This file is trusted pipeline code. Keep the change small and standard library only.
Done when:
- Tests in
WheelModules:- the layout above gives
demoas a top module,demo._speedas an extension and a count of 1, from bothplatlibandpurelib; - a wheel with the same module at the root and under
platlibnames it once; demo-1.0.data/scripts/tool.pyanddemo-1.0.data/headers/x.hare still ignored;wheel_names()lists the modules and packages underpurelib/platlib.
- the layout above gives
test_dist_info_and_data_folders_are_ignored_by_bothis updated to say what is still ignored.- In the PR, the one-line change that makes a new test fail.
uvx --python 3.14 [email protected]passes, offline.
- Lenguaje dominante
- Python
- Estrellas
- 0
- Forks
- 1
- Merge medio
- 5 h 59 min
- PR fusionados (30 d)
- 19
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
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 wheelgap/wheels
-
documentation good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
enhancement help wanted
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
Los mantenedores suelen responder en 1 día
-
bug help wanted
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
Los mantenedores suelen responder en 1 día
Todos los issues de wheelgap/wheels
Issues similares
-
flaky: test_fire_returns_thread_per_http_entry_on_head waits 5 s per dispatch worker on busy shardsAbiertostatus/accepted type/bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
microsoft/apm#5309 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bug vector-store
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
EverMind-AI/Raven#1413 ·
Los mantenedores suelen responder en 1 día
-
Tests: parallel pyinstallcheck runs oversubscribe the machine through nested TBB and BLAS poolsPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 86/100
ACCESS-NRI/containerised-environments-infra#143 ·
Los mantenedores suelen responder en 2 días