From 1cbdabbbb7ed599ec8a1b63cadcff3dea5082932 Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Tue, 17 Sep 2019 23:46:31 -0400 Subject: [PATCH] linux install: make sure init_calibre.py is listed in calibre-uninstall It is written raw, not via write_template, so it was never added to the manifest. Therefore, it would remain behind when uninstalling calibre. Also change the order in which steps are executed, in order to write the env module -- and add it to the manifest -- before the uninstaller is created, rather than after (which would be too late). --- setup/install.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup/install.py b/setup/install.py index 2be6b54e99..dc89c9fc3f 100644 --- a/setup/install.py +++ b/setup/install.py @@ -147,8 +147,8 @@ class Develop(Command): self.consolidate_paths() self.install_files() self.write_templates() - self.run_postinstall() self.install_env_module() + self.run_postinstall() self.success() def install_env_module(self): @@ -164,6 +164,7 @@ class Develop(Command): self.info('Installing calibre environment module: '+path) with open(path, 'wb') as f: f.write(HEADER.format(**self.template_args()).encode('utf-8')) + self.manifest.append(path) def install_files(self): pass