bytecodealliance / bytecodealliance/componentize-py
Add support for .pth files
- 主要语言
- Rust
- 星标
- 279
- 派生
- 52
- 平均合并
- 12 小时 10 分钟
- 30 天内合并 PR
- 10
描述
> 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.
贡献指南
调研方向
从链接的 Python site 文档以及 componentize-py 对 .venv/ 路径的处理开始。将所需行为与 .pth 关于路径条目、注释、空行、重复条目、缺失路径和 import 行的规则进行比较。完成的标准是,受支持的 .pth 文件能够将有效的项目路径添加到 sys.path,同时不添加无效或重复的条目。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python, rust
- 领域
- tooling
- Issue 类型
- 功能
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100