More robust setup.py code generation
commitf40b254262b2a80f4449c7085fecc26abdc52009
authorPeter Grayson <pete@jpgrayson.net>
Fri, 10 Sep 2021 14:01:21 +0000 (10 10:01 -0400)
committerPeter Grayson <pete@jpgrayson.net>
Fri, 10 Sep 2021 17:50:38 +0000 (10 13:50 -0400)
treeb377232f1eb0fff84e23997b5fa5fa9b1f13f814
parent1aa00150ee9aa41d0d1f6e13ed08692446c8378d
More robust setup.py code generation

In setup.py, the code generation learns some new tricks:

- Only write generated files if their content would change.
- If the generated files exist and we cannot import stgit, do nothing.
- Modify sys.path to enable importing stgit.

This specifically resolves the problem of installing stgit from a git
URL, e.g. `pip install git+https://github.com/stacked-git/stgit.git`.

Signed-off-by: Peter Grayson <pete@jpgrayson.net>
build.py
contrib/release/pkgtest.py
setup.py
stgit/commands/__init__.py