How to build Python-C++ libraries
summary
Explains how to produce redistributable Python wheels for C++ extensions by using scikit-build + CMake to control compiler flags and dependencies, CI (Travis/Circle/AppVeyor) to build across multiple OSes and Python versions, and auditwheel/multi-build to bundle transitive native libs and create manylinux-compatible wheels. Shows a minimal C++ math extension, automates rebuilds, runs ~11 CI jobs per change, and performs a one‑click deploy to PyPI triggered by a git tag — yielding reproducible, tested wheels that install on target platforms.
AI-written summary · about
chapters (11)
- 0:00Introduction to pip packaging
- 2:15Understanding package structure
- 7:22The history of packaging tools
- 9:45Creating C extensions
- 13:05Challenges of native builds
- 21:51Introduction to scikit-build
- 27:44Automating build workflows
- 31:58Testing with CI services
- 36:21Distributing wheels
- 39:53Cross-platform automation
- 44:26Conclusion and Q&A
related talks
40mBuilding a binary extension
24mA tale of Python C extensions and cross-platform wheels
24mThe wheelhouse of horrors
37mScikit build: A build
36mIntroduction to C++ python extensions and embedding Python in C++ Apps
29mGenerating Python bindings to C++ libraries
25mHow to bring your C++ project to Python land
01h 01mExtend and Embed Python with C++
