Comment 1 for bug 1876164

Revision history for this message
Eli Schwartz (eschwartz) wrote : Re: [Bug 1876164] [NEW] calibre-uninstall doesn't run on Ubuntu 20.04

The linux-installer.py script has already been switched for Ubuntu's
convenience to be a shellscript that repeatedly tries to find various
interpreters. So that's one option.

Maybe, however, it would be better to make calibre.linux:PostInstall
accept another argument, which linux-installer.py would populate as

pi.extend(['--python-cmd', sys.executable])

This would ensure that whichever python command was used when
linux-installer.sh probed for a suitable $PYTHON to run its integrated
heredoc, was also embedded into the calibre-uninstall program.

setup/install.py could make opts.python_cmd default to sys.executable
for from-source builds, and for the case where someone uses an isolated
install of the binary build, then later runs calibre_postinstall, they
can either manually specify it or let it assume /usr/bin/python.