Where did my setup.py go? Changes in Python Recipes in Yocto Project 4.0 ‘kirkstone’ Release
2022-05-19 , Kirkstone

Upstream Python has deprecated ‘distulils’ and is moving towards ‘pyproject.toml’ instead of ‘setup.py’. In this talk you will learn what changed in the Yocto Project classes and recipes for Python packages in the 4.0 ‘kirkstone’ release. You will also learn about how to look at an upstream ‘pyproject.toml’ and determine which of the new classes to use instead of ‘setuptools3’. We will also discuss recipes for packages that add Rust extensions for Python.


Upstream never stops moving and we need to ride the wave of change. With the deprecation of ‘distutils’ in Python 3.10 (slated for removal in Python 3.12), we need to understand how to use ‘setuptools’ instead. As if that wasn’t enough, with the implementation of PEP-517 and related changes comes the new ‘pyproject.toml’ standard as a replacement for ‘setup.py’. Python packages are no longer distributed as “eggs”, but are now only distributed as ‘sdist’ (source tarball) or ‘wheel’ (installable packages). Meanwhile C-extensions are not the only kid in town, Rust extensions are beginning to be implemented, such as in ‘python3-cryptography’, Hold onto your seats while we take a quick tour of the new world of Python recipes in Yocto Project!

See also: YPS Python Changes Slides (PDF) (1.6 MB)

Tim Orling is a Principal Software Engineer at Konsulko Group. Tim joined Konsulko Group at the end of 2021. Tim was elected to the OpenEmbedded Board in 2022. He has spent many years as a volunteer developer for OpenEmbedded and the Yocto Project. He has been an open source software and embedded hardware enthusiast for many years. He taught in a university setting for more than 5 years and has given many well-received training sessions and technical talks at conferences. Tim is currently working in areas of over the air updates, secure boot and disk encryption. Tim has driven updates in the Python recipe infrastructure to keep up with upstream packaging changes and the introduction of Rust extensions. Tim has been tinkering at home with microcontrollers via Zephyr Project, MicroPython and CircuitPython.

This speaker also appears in:

Principal Yocto Engineer at Arm Ltd.