Building C and C++ Extensions

A C extension for CPython is a shared library (for example, a .so file on Linux, .pyd on Windows), which exports an initialization function.

See Definiowanie modułów rozszerzeń for details.

Building C and C++ Extensions with setuptools

Kompilację, pakowanie i dystrybucję modułów rozszerzeń najlepiej wykonywać za pomocą narzędzi firm trzecich, co wykracza poza zakres niniejszego dokumentu. Jednym z odpowiednich narzędzi jest Setuptools, którego dokumentację można znaleźć pod adresem https://setuptools.pypa.io/en/latest/setuptools.html.

The distutils module, which was included in the standard library until Python 3.12, is now maintained as part of Setuptools.