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
派生
35.9k
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 摘要。