Install stg executable using entrypoint mechanism
commitb0c4866909049b543e58c94bbde52424edaa4fc4
authorPeter Grayson <pete@jpgrayson.net>
Mon, 30 Aug 2021 16:42:55 +0000 (30 12:42 -0400)
committerPeter Grayson <pete@jpgrayson.net>
Mon, 6 Sep 2021 20:52:06 +0000 (6 16:52 -0400)
tree053ea73e4b92ebcf91151213c8edb80f5f3daefd
parent5a8e05c7a2b27da02ada931552c60fecc43c65d9
Install stg executable using entrypoint mechanism

When a stgit distribution is installed, the stg executable will now be
auto-generated at install time by the installer (i.e. pip). This is a
standard, contemporary approach for python applications. It helps ensure
that the executable is associated with the correct python runtime
environment.

The `stg` script at the worktree root remains, but only as a
development-time convenience.

To re-enable code coverage, the t/test-bin/stg script is added and
test-lib.sh updated. This ends up being a nice simplification versus the
previous approach with the really nice benefit of no longer having to
comprehend coverage within the stgit python code. t/test-bin/stg is now
able to wrap stg invocations with coverage.

N.B. test-lib.sh used to complain mightily when it detected that stgit
wasn't previously built. Those complaints were removed. The test suite will
run just fine if the build hasn't happened, with the caveat that cmdlist.py
will not have been generated and thus there is more runtime overhead. So
its still best to build to improve test runtime.

Signed-off-by: Peter Grayson <pete@jpgrayson.net>
MANIFEST.in
Makefile
setup.py
stgit/__main__.py
t/test-bin/stg [new file with mode: 0755]
t/test-lib.sh