Skip to content

The forgotten slide: Packaging

Christian Ledermann edited this page Oct 23, 2023 · 19 revisions

In the original Hypermodern Python Blogpost, Poetry was recommended as the preferred tool. There are quite a lot of packaging tools out there which I do not want to go into in depth, instead I recommend Anna-Lena Popkes An unbiased evaluation of environment management and packaging tools. What has emerged as the preferred way to store packaging information is the pyproject.toml file.

There are a number of tools to convert legacy package information into this format.

  • setuptools-py2cfg A script for converting setup.py to setup.cfg

  • ini2toml which automatically translates .ini/.cfg files into TOML

  • req2toml converts requirements.txt to pyproject.toml

  • validate-pyproject for automated checks on pyproject.toml powered by JSON Schema definitions

  • pyprojectsort enforces consistent formatting of pyproject.toml files, reducing merge request conflicts and saving time otherwise spent on manual formatting.

  • pyroma Rate your Python packages package friendliness.

  • pyproject-fmt to apply a consistent format to pyproject.toml files. XXX