bytecodealliance / bytecodealliance/componentize-py
Add support for .pth files
- Ngôn ngữ chính
- Rust
- Star
- 277
- Fork
- 51
- Merge trung bình
- 12 giờ 10 phút
- Pull request đã merge (30 ngày)
- 10
Mô tả
> 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.
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu với tài liệu Python về site được liên kết và cách componentize-py xử lý đường dẫn .venv/. So sánh hành vi được yêu cầu với các quy tắc .pth đối với các mục đường dẫn, chú thích, dòng trống, mục trùng lặp, đường dẫn không tồn tại và các dòng import. Hoàn thành có nghĩa là các tệp .pth được hỗ trợ có thể thêm các đường dẫn dự án hợp lệ vào sys.path mà không thêm các mục không hợp lệ hoặc trùng lặp.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- python, rust
- Lĩnh vực
- tooling
- Loại issue
- Tính năng
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100