python

Python packaging bedlam

Marcelino Veloso III,

There are many python-based packaging / dependency solutions.

The setup instructions of my projects, including this one on pelican, relies on poetry as a means of orchestrating setups.

I've moved from Pipfile to plain requirements.txt to pyproject.toml over the last few years but there doesn't seem to be much consensus on how to finalize dependencies. I settled on poetry because I liked the fact that it was an early supporter of pyproject.toml but it seems like the way this file should be built, populated, run... is still very much in contention in the community.

I'd put the obligatory meme here but it's reached a point of being cliche.

The build tools vary. The Python Packaging Authority lists the following projects as example build tools:

  1. flit
  2. hatch
  3. pdm
  4. poetry
  5. setuptools
  6. trampolim
  7. whey

With the sudden rise of experimental rye - nearing 6k stars after less than a month of going live - there is renewed discussion on a more cohesive approach to bootstrapping and managing python projects:

  1. A few notes on Rye by Simon Willison
  2. HackerNews search results on rye + python

poetry seems like the safe winner here since it's nearing 25k stars on Github but the same could have been said of pipenv early on (the latter is now nearing 24k stars).

Eager to see how this plays out and if it's possible for a tenet of Zen of Python to materialize:

There should be one-- and preferably only one --obvious way to do it.