bytecodealliance / bytecodealliance/componentize-py

Add support for .pth files

Open
#181 7 comments 0 reactions 0 assignees View on GitHub
good first issue
Dominant language
Rust
Stars
277
Forks
51
Avg merge
12h 10m
Merged PRs (30d)
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.

Contributor guide

Open the contributing guide

Research direction

Start with the linked Python site documentation and the componentize-py handling of the .venv/ path. Compare the requested behavior with .pth rules for path entries, comments, blank lines, duplicate entries, missing paths, and import lines. Done means supported .pth files can add valid project paths to sys.path without adding invalid or duplicate entries.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, rust
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.