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).
This commit is contained in:
Eli Schwartz 2019-09-17 23:46:31 -04:00
parent 19c4636677
commit 1cbdabbbb7
No known key found for this signature in database
GPG Key ID: CEB167EFB5722BD6

View File

@ -147,8 +147,8 @@ class Develop(Command):
self.consolidate_paths() self.consolidate_paths()
self.install_files() self.install_files()
self.write_templates() self.write_templates()
self.run_postinstall()
self.install_env_module() self.install_env_module()
self.run_postinstall()
self.success() self.success()
def install_env_module(self): def install_env_module(self):
@ -164,6 +164,7 @@ class Develop(Command):
self.info('Installing calibre environment module: '+path) self.info('Installing calibre environment module: '+path)
with open(path, 'wb') as f: with open(path, 'wb') as f:
f.write(HEADER.format(**self.template_args()).encode('utf-8')) f.write(HEADER.format(**self.template_args()).encode('utf-8'))
self.manifest.append(path)
def install_files(self): def install_files(self):
pass pass