A cookiecutter
template helps to setup a light and slim python package with such features:
src
layout project- CI/CD to publish package
- minimal package requirements
Install the latest Cookiecutter if you haven't installed it yet (this requires Cookiecutter 1.4.0 or higher):
pip install -U cookiecutter
Generate a Python package project from local project directory:
cookiecutter cookiecutter-py-package-slim/
Generate a Python package project from GitHub:
cookiecutter https://github.com/liviaerxin/cookiecutter-py-package-slim.git
- add github actions
- use
setup.py
,setup.cfg
andpyproject.toml
files all inpyproject.toml
. - use
pip
to build wheel instead ofbuild
tool. - pip wheel
- add tests
https://www.seanh.cc/2022/05/21/publishing-python-packages-from-github-actions/