Source code samples and slides for the SSC compact course "Python Packaging".
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.
Open slides | Download as PDF | Course description
- 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
- pybind11-numpy-example
- a simple example of packaging including c++ compiled extensions
- an example meta.yaml conda-forge recipe for this package
- the resulting conda-forge feedstock for this package
- hammingdist
- a more advanced example with a compiled extension making use of OpenMP and CUDA
- Pure Python packaging
- Python packaging with compiled extensions
- Cookiecutters to generate your own GitHub repo for a Python package