Flit is a simple way to put Python packages and modules on PyPI.
It tries to require less thought about packaging and help you avoid common
mistakes.
See Why use Flit? for
more about how it compares to other Python packaging tools.
Install
$ python3 -m pip install flit
Flit requires Python 3 and therefore needs to be installed using the Python 3
version of pip.
Python 2 modules can be distributed using Flit, but need to be importable on
Python 3 without errors.
Usage
Say you’re writing a module foobar — either as a single file foobar.py,
or as a directory — and you want to distribute it.
Make sure that foobar’s docstring starts with a one-line summary of what
the module is, and that it has a __version__:
"""An amazing sample package!"""
__version__ = "0.1"
Install flit if you don’t already have it:
python3 -m pip install flit
Run flit init in the directory containing the module to create a
pyproject.toml file. It will look something like this:
[build-system]
requires = ["flit_co
|