Add support for .pth files

Offen
#181 7 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

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

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.

Beschreibung

good first issue

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.

Vorherrschende Sprache
Rust
Sterne
284
Forks
56
Ø Merge
2 T. 4 Std.
Gemergte PRs (30 T.)
3

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus bytecodealliance/componentize-py

Alle Issues in bytecodealliance/componentize-py

Ähnliche Issues

Weitere Issues zu Rust

Neue Issues direkt in Ihr Postfach

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