bytecodealliance / bytecodealliance/componentize-py

Add support for .pth files

Offen
#181 7 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
good first issue
Vorherrschende Sprache
Rust
Sterne
277
Forks
51
Ø Merge
12 Std. 10 Min.
Gemergte PRs (30 T.)
10

Beschreibung

> 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.

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne mit der verlinkten Python-site-Dokumentation und der Behandlung des Pfads .venv/ durch componentize-py. Vergleiche das angeforderte Verhalten mit den .pth-Regeln für Pfadeinträge, Kommentare, leere Zeilen, doppelte Einträge, fehlende Pfade und Importzeilen. Erledigt bedeutet, dass unterstützte .pth-Dateien gültige Projektpfade zu sys.path hinzufügen können, ohne ungültige oder doppelte Einträge hinzuzufügen.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
python, rust
Bereich
tooling
Issue-Typ
Feature
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.