Do not use data_files in setup.py
commit5df591b2789cf15c9d8f6a9e250e404e567739a0
authorPeter Grayson <pete@jpgrayson.net>
Fri, 10 Sep 2021 18:09:11 +0000 (10 14:09 -0400)
committerPeter Grayson <pete@jpgrayson.net>
Fri, 10 Sep 2021 19:00:19 +0000 (10 15:00 -0400)
tree40acd6a936f83e7012e0d2b2f6a50098516ed5e4
parentf40b254262b2a80f4449c7085fecc26abdc52009
Do not use data_files in setup.py

The data_files feature is deprecated by setuptools. The gist of
rationale is that these data_files, which are files that exist outside
the python package, have platform-specific destinations and this falls
outside the scope of what setuptools wants to help with.

For StGit, which is first and foremost an application and not a Python
library, we cannot count on setuptools to provide/perform a complete
installation of all the extras that come with StGit. We *can* rely on
setuptools to install the `stgit` Python package and accompanying `stg`
executable.

In other words, setuptools is fine for packaging and installing the
`stg` executable and its required runtime which includes the `stgit`
package and the template files found in `stgit/templates`, but not for
other bits and pieces that are not essential for `stg` to run correctly,
such as completion scripts, vim config files, documentation, contrib
scripts, etc.

A complete distribution of StGit must thus be accomplished via operating
system specific packaging. E.g. debian packages, rpms, brew, etc. These
systems can account for packaging and installing both StGit's python
runtime and StGit's ancilliary files in their platform-specific
destinations.

N.B. the sdist tarball produced by setuptools still contains everything
needed to make a complete StGit distribution. But not everything will be
installed if installing the sdist (or wheel) with setuptools or pip.

Signed-off-by: Peter Grayson <pete@jpgrayson.net>
MANIFEST.in
contrib/release/pkgtest.py
setup.py