bytecodealliance / bytecodealliance/componentize-py
Add support for .pth files
- Langage dominant
- Rust
- Étoiles
- 277
- Forks
- 51
- Merge moyen
- 12 h 10 min
- PR mergées (30 j)
- 10
Description
> A path configuration file is a file whose name has the form **name.pth** and exists in one of the four directories mentioned above; its contents are additional items (one per line) to be added to sys.path. Non-existing items are never added to sys.path, and no check is made that the item refers to a directory rather than a file. No item is added to sys.path more than once. Blank lines and lines beginning with # are skipped. Lines starting with import (followed by space or tab) are executed.
https://docs.python.org/3/library/site.html
.pth files are often used by python packaging systems (like uv, etc...) to make working on the current project more elegant, by pointing from the .venv/ path to the project path.
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez par la documentation Python liée concernant site et par la gestion du chemin .venv/ dans componentize-py. Comparez le comportement demandé avec les règles des fichiers .pth pour les entrées de chemin, les commentaires, les lignes vides, les entrées en double, les chemins inexistants et les lignes d’importation. Le travail est terminé lorsque les fichiers .pth pris en charge peuvent ajouter des chemins de projet valides à sys.path sans ajouter d’entrées non valides ou en double.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- python, rust
- Domaine
- tooling
- Type d'issue
- Fonctionnalité
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 35/100