[FEATURE] Python on NuttX: known issues, "TO-DO" list, and general enhancements

オープン
#2,884 コメント 6 件 リアクション 2 件 担当者 1 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@tmedicci がすでに取り組んでいます。

2024年12月9日 から。

評価

この issue はまだ評価されていません。

説明

Area: Interpreters
Is your feature request related to a problem? Please describe.

After https://github.com/apache/nuttx-apps/pull/2879 was merged, it's time to make Python on NuttX fully usable!

This issue intends to discuss the next steps required to make it fully functional, including a "To-Do" list and any discussions on how it would evolve to support other architectures and platforms.

Initial Considerations

  1. Python for NuttX target initially the rv-virt (RISC-V QEMU). That being said, its interpreters/python/config.site and interpreters/python/Setup.local are somehow tied with the features enabled by the boards/risc-v/qemu-rv/rv-virt/configs/cpython/defconfig. Python for NuttX depends on CONFIG_EXPERIMENTAL!
  2. Python modules are stored in pyc (byte-code format) and are loaded from a ROMFS image at startup.
  3. Environment variables like PYTHONHOME and PYTHON_BASIC_REPL needs to be set accordingly.
Describe the solution you'd like

TO-DO list:

This is the list of the next steps to make Python's port fully functional (sorted by highest priority):

  • Provide a CMake-based build: currently we can only build it using Make.
  • Generate interpreters/python/Setup.local and interpreters/python/config.site dynamically according to the enabled configs. For instance: export ac_cv_func_pipe="yes" depends on CONFIG_PIPES being enabled.
  • Create a wrapper application to automate the 1) mounting the ROMFS image with the Python's modules, 2) setting the environment variables and 3) running the Program/python.c app.
  • Support Python's socket module. This is one of the most important modules to enable Python applications with POSIX-compatible sockets .

Known Issues

Describe alternatives you've considered

No response

Verification
  • I have verified before submitting the report.
主要言語
C
スター
475
フォーク
811
平均マージ
1日 11時間
マージ済み PR(30日)
181

環境構築

  • Dockerfile・Docker Compose ファイルなし
  • プルリクエストのテンプレートあり
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

apache/nuttx-apps のほかの issue

apache/nuttx-apps の issue をすべて見る

似ている issue

C の issue をもっと見る

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

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