bazel-contrib / bazel-contrib/rules_python
Make py_wheel provide depset of files
- Langage dominant
- Starlark
- Étoiles
- 688
- Forks
- 721
- Merge moyen
- 15 h 7 min
- PR mergées (30 j)
- 76
Description
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.
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez par lire l’implémentation existante de py_wheel et wheelmaker.py afin de comprendre comment le contenu des wheels et leur préfixe sont produits. Définissez comment py_wheel expose le préfixe et les fichiers, et comment py_wheel_as_py_library les utilise pour fournir PyInfo() sans mettre en staging ni extraire une archive. Le travail est terminé lorsqu’un wheel généré au moment du build peut être utilisé par py_test via le modèle de dépendance proposé.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- python
- Domaine
- build-system
- Type d'issue
- Fonctionnalité
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 38/100