Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add pyproject.toml to allow building sdist, wheel
This allows anyone to `python -m build` an sdist or wheel for Hancho. In particular, @aappleby should be able to use this config as-is if they choose to publish Hancho on PyPI. The original `hancho.py` remains standalone and independent, and can still be copied into project development trees as-is. If @aappleby puts hancho on PyPI, anyone will be able to install and update hancho via `pip install` or whatever dependency management system they like. It also helps system package maintainers to package Hancho for their distribution with little modification. As a PEP 517 build backend, I suggest poetry-core rather than setuptools because poetry-core specifically supports packaging single-file `*.py` modules that live in a project root directly, while the setuptools backend would have required a subdirectory. This makes sure that `hancho.py` remains a portable, self-contained script that doesn’t require PyPI, pip, or anything else, and can be copied anywhere you like. One real-life example of a working system package using the Poetry backend is the `hancho` AUR package. [1] [2] [3] Addresses aappleby#1. [4] [1]: https://aur.archlinux.org/packages/hancho [2]: https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=hancho [3]: https://aur.archlinux.org/cgit/aur.git/tree/pyproject.toml.template?h=hancho [4]: aappleby#1
- Loading branch information