A tale of Python C extensions and cross-platform wheels
summary
Creates a C++ wrapper with pybind11, implements a PDF→PNG converter using Poppler, and packages extension modules with setup.py so pip builds a shared-object wheel. Compiles platform-specific shared libraries in Docker, macOS builders, and Visual Studio, uses cibuildwheel for CI, runs auditwheel (Linux) and delvewheel (Windows) to bundle dependencies, applies DLL mangling when needed, and uploads cross-platform wheels to PyPI that install and run as expected.
AI-written summary · about
chapters (8)
- 0:00Introduction and project goal
- 1:15Motivation and use case
- 3:03Writing Python C extensions
- 6:11Using Pybind11
- 9:46Shared libraries explained
- 12:39Linking shared dependencies
- 17:26Bundling libraries in wheels
- 21:06Automation and conclusions
related talks
40mBuilding a binary extension
49mHow to build Python-C++ libraries
24mThe wheelhouse of horrors
29mGenerating Python bindings to C++ libraries
01h 01mExtend and Embed Python with C++
36mIntroduction to C++ python extensions and embedding Python in C++ Apps
25mHow to bring your C++ project to Python land
32mReinventing the Wheel: A Community-Driven Roadmap for Python Packaging
