Description
In this course we will learn how to package a Python library, how to publish it on PyPI and on conda-forge, as well as look at more advanced topics like building pre-compiled wheels including c++ extensions using pybind11, and automatically publishing new releases using continuous integration and cibuildwheel.
Slides
download slides as pdf | course description |
Python Package Examples
Pure Python Package
- calculate-minimal
- A bare-bones minimal Python package that can be locally installed
- calculate-liam
- A more complete version of this Python package that is published on testPyPI
- This github action automatically publishes new versions to testPyPI on tagged commits
Python Package with C++ compiled extensions
- pybind11-numpy-example
- a simple example of packaging including c++ compiled extensions
- an example meta.yaml conda-forge recipe for this package
- hammingdist
- a more advanced example with a compiled extension making use of OpenMP and CUDA
Recommended resources
- Pure Python packaging
- Python packaging with compiled extensions
- Cookiecutters to generate your own GitHub repo for a Python package