python / python/devguide

Document how to add a new C extension module

未關閉
#913 1 則留言 1 個 reaction 已指派 1 人 在 GitHub 檢視

@tiran 已經在處理了。

開始於 2022年7月9日。

topic-c api topic-dev process type-feature
主要語言
Python
星號
2.1k
分支
1k
平均合併
2 天 12 小時
30 天內合併 PR
12

描述

memo to me

Python 3.12 will drop setup.py. 3.11 has already detects most modules on configure and builds them through Modules/Setup.stdlib. The new system is not well documented yet.

configure.ac

  • PY_STDLIB_MOD / PY_STDLIB_MOD_SIMPLE
  • SRCDIRS if module is in a subdirectory
  • How to write PKG_CHECK_MODULES block

Modules/Setup.stdlib.in

  • @MODULE_SPAM_TRUE@spam spam.c egg.c

Makefile.pre.in

  • MODULE_SPAM_DEPS=$(srcdir)/Modules/spam.h

貢獻指南

開啟貢獻指南

從這裡開始

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

評估

這個 Issue 還沒有評估資料。

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

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