`mdninja -v` should provide the package version. See <https://packaging.python.org/guides/single-sourcing-package-version/> on the choices for implementation. No 4 (using a `VERSION` file) looks interesting.