Dealing with the following message:
WARNING: flake8 setuptools integration is deprecated and scheduled for removal in 4.x. For more information, see https://gitlab.com/pycqa/flake8/issues/544
Currently guake only generates a schema file if there is no schema file present. If there is a schema file from an older version of guake present, glib will attempt to use that file, segfault and never return execution back to python. Do manual version recording and checking ourselves to regenerate the file instead of relying on exception handling on glibc.
Do not rely on running pip to install dependencies, which e.g. distros cannot
do. Instead let this be specified directly as package metadata.
While we are at it, stop actually running pip install if DESTDIR is set, since
this is a fairly likely sign that guake is being installed in a distro
environment where pip install is not allowed.
$(prefix) uppercased for convention: DESTDIR and PREFIX are the usual parameters of `make install`.
Mixed var-casing just looks clumsy in `make DESTDIR=/tmp/mypkgroot prefix=/usr install`.
Dropped scripts/find-first-site-package.py as junk code. It didn't work
altogether, always returning '/'. Because distutils.sysconfig.get_python_lib()
returns *one string*, not a list of strings; thus get_python_lib()[0] == '/'.
However, it isn't that trivial to detect the correct path to site-packages of
the last install. What we do, is take *all* possible site-packages locations
from site.getsitepackages([$PREFIX]), and remove {guake,guake-*.egg-info} from
there. This is robust, and can't do any harm besides wiping [possibly several]
guake packages under the specified PREFIX (which defaults to /usr/local) --
which is exactly what `make uninstall` is supposed to do anyway.
Targets uninstall-old-locale, uninstall-old-schemas dropped. I fail to see any
purpose and/or utility of them. With OLD_PREFIX:=$(DESTDIR)usr (which by itself
conflates considerations and simply is wrong), what those targets did can be
trivially emulated via `make DESTDIR=... PREFIX=/usr uninstall`; so there
remains no point in duplicating the uninstall path lists.
Target uninstall-schemas expanded to cover all installed artifacts.
Target uninstall-locale's idempotence fixed using the `|| :` error-silencer.
"Installing from source" warning corrected and made more prominent.
DEV_*_DIR vars dropped as unused, except DEV_DATA_DIR which is used.
Tested with:
make DESTDIR=/tmp/tt PREFIX=/usr/local install
make DESTDIR=/tmp/tt PREFIX=/usr/local uninstall
tree /tmp/tt
# 13 directories, 0 files
closes#1646 @ GitHub.
sem-ver: bugfix
If user using different python interpreter with customize prefix,
it can then install Guake with customize prefix now:
$ make
$ PYTHON_INTERPRETER=python3.7 prefix=~/.local/pythons/3.7 make install
$ which guake
~/.local/pythons/3.7/bin/guake