bazel-contrib / bazel-contrib/rules_python

Make py_wheel provide depset of files

Abierto
#3,068 0 comentarios 2 reacciones 0 asignados Ver en GitHub
core-rules type: feature request
Lenguaje dominante
Starlark
Estrellas
688
Forks
721
Merge medio
15 h 7 min
PR fusionados (30 d)
76

Descripción

The basic goal is to allow depending on a build-time generated wheel (i.e. `py_wheel` _without_ having to go through the zip/unzip process of creating a wheel archive. Wheels may be large in size, so the process of staging, archiving, and extracting them is unnecessary overhead.

So the idea is `py_wheel` provides `(prefix, files)` information, which can then be used by consumers. This then allows e.g.

```
py_wheel(name="foo_whl", ...)
py_wheel_as_py_library(
name = "foo_whl_as_pylib",
srcs = [":foo_whl"]
)
py_test(
name="foo",
deps = ["foo_whl_as_pylib"],
)
```

Where `py_wheel_as_py_library` returns PyInfo() et al pointing to what the whl would extract to (i.e. a directory with the contents of the wheel).

Looking at py_wheel, this looks quite doable, since Starlark is already generating most (if not all?) of what goes into the wheel, and the `wheelmaker.py` program is mostly just zip's the files up.

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Empieza leyendo la implementación existente de py_wheel y wheelmaker.py para entender cómo se generan el contenido de los wheels y su prefijo. Define cómo py_wheel expone el prefijo y los archivos, y cómo py_wheel_as_py_library los utiliza para proporcionar PyInfo() sin preparar ni extraer un archivo. Se considera terminado cuando un wheel generado durante la compilación puede ser consumido por py_test mediante el patrón de dependencias propuesto.

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

Evaluación

Stack tecnológico
python
Área
build-system
Tipo de issue
Nueva funcionalidad
Dificultad
5/5
Tiempo estimado
Más de una semana
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
38/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.