Blubb - An example project with a minimalistic, automatic setup.py file
This example project demonstrates a layout and best practices for a single- script Python package that might contain one or more packages and data files that need installing. The script is made so that it also can be run from source (or installed system-wide).
- Only set one value in setup.py (PACKAGE_NAME), rest is automatic
- Metadata only defined in one place (lib/<PACKAGE_NAME>/__init__.py)
- Known-good module documentation (PYTHONPATH=lib pydoc <PACKAGE_NAME>)
- Runnable from a source checkout or from system-wide installation
- Standardized option parsing, including --version, --verbose and --help
- Manual page can be auto-generated with help2man (sh update_manpage.sh)
- Easy building of installation packages (e.g. RPM) (sh build_rpm.sh)
Scripts such as "update_manpage.sh" and "build_rpm.sh" are here only while we design the example project. Ideally all these utilities should be combined into a separate package (something like a "python package assistant" utility).