python / python/cpython

Freeze the `_sysconfigdata_*` module

未關閉
#131,779 5 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

build OS-wasi topic-installation topic-sysconfig type-feature
主要語言
Python
星號
77.2k
分支
36k
PR 合併指標
PR 指標待擷取

描述

Feature or enhancement

Proposal:

After generating _sysconfigdata_*, we could freeze it, like we do to the rest of the standard library.

This should remove the necessity for workarounds such as having to manually set PYTHONPATH to the _sysconfigdata_* directory when running WASM artifacts:

https://github.com/python/cpython/blob/151d1bfd1bb7ca9a36bb0f2bd6df53d64a1ba2f2/Tools/wasm/wasi.py#L226-L227

It should also make it easier to build a fully self-contained statically-linked relocatable interpreter.

Has this already been discussed elsewhere?

No response given

Links to previous discussion of this feature:

No response

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

從 Tools/wasm/wasi.py 中第 226-227 行附近提到的 workaround 開始,接著追蹤產生的 sysconfigdata* 模組在 CPython 建置過程中如何處理。確定應如何將凍結該模組整合到現有的標準函式庫凍結流程中;完成的標準是 WASM 成品不再需要手動將 PYTHONPATH 設定為該模組所在的目錄。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
python, wasm
領域
build-system
Issue 類型
功能
難度
5/5
預估耗時
一週以上
活躍度
停滯
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。