# Python packages

Date: 2021-07-17 21:59:04 +08:00Date modified: 2021-07-17 21:59:04 +08:00

- the most common distribution tool as of 2021-07-17 is `setuptools` which uses `setup.py` which is a script telling how to build the Python module; it is documented from the official documentation

- some projects replaces the `setup.py` with `pyproject.toml` which solves the dependency problem; it is specified from PEP-0518

- some projects replaced the official Python package manager (`pip`) with poetry which requires a new setup; it can use `pyproject.toml` which makes it easy to install with either the official setup or Poetry; projects may have a `poetry.toml` to configure the module similarly to `package.json` in NodeJS packages; Poetry packages may also has a lockfile at `poetry.lock`

- examples:

  - the source of Poetry itself uses the Poetry package manager

  - Cookiecutter (at commit `d6037b7dee5756e35a6ecd5b522899a9061c2c79`) uses `pyproject.toml` with a shim for the `setuptools`

  - Cruft uses Poetry (which in turn can use the official distribution setup)

  - rmfuse uses `pyproject.toml` that can be installed either with Pip or Poetry