devguide icon indicating copy to clipboard operation
devguide copied to clipboard

Document how to add a new C extension module

Open tiran opened this issue 3 years ago • 1 comments

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

tiran avatar Jul 09 '22 10:07 tiran

@tiran Has this issue been resolved?

abdnafees avatar Nov 24 '22 20:11 abdnafees