python / python/cpython

Freeze the `_sysconfigdata_*` module

オープン
#131,779 コメント 5 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

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. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず Tools/wasm/wasi.py の226-227行付近にある参照先の workaround から始め、CPython のビルド中に生成された sysconfigdata* モジュールがどのように扱われるかを追跡します。これをフリーズする処理を既存の標準ライブラリのフリーズ処理にどのように統合すべきかを確認します。WASM アーティファクトで、対象モジュールのディレクトリを PYTHONPATH に手動で設定する必要がなくなれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
python, wasm
領域
build-system
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。