A very small example package to demonstrate the flit
build backend and a setup.py
free python package.
Roughly in this order...
python3 -m venv venv
source venv/bin/activate
This is the build backend, nothing will work without this. This is INSTEAD of setuptools. The reason is it provides a much much much simpler configuration for basic python-only packages.
pip install flit
Use the flit init
tool (or copy paste an existing pyproject.toml
)
flit init
So that all code changes are present in the environment immediately without having to reinstall your package. This is the equivalent of the old pip install -e .
flit install
Add these to project.dependencies
in the pyproject.toml
.
Unittest will auto-discover test files that are named like test*.py
. See here
python -m unittest