mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
add a conda clean function to remove downloaded tarballs after installation
This commit is contained in:
@@ -214,6 +214,16 @@ class CondaContext(installable.InstallableContext):
|
||||
install_base_args.extend(args)
|
||||
return self.exec_command("install", install_base_args)
|
||||
|
||||
def exec_clean(self, args=[]):
|
||||
"""
|
||||
Clean up after conda installation.
|
||||
"""
|
||||
clean_base_args = [
|
||||
"--tarballs"
|
||||
]
|
||||
clean_base_args.extend(args)
|
||||
return self.exec_command("clean", clean_base_args)
|
||||
|
||||
def export_list(self, name, path):
|
||||
return self.exec_command("list", [
|
||||
"--name", name,
|
||||
@@ -488,6 +498,7 @@ def build_isolated_environment(
|
||||
|
||||
return (path or tempdir_name, exit_code)
|
||||
finally:
|
||||
conda_context.exec_clean()
|
||||
shutil.rmtree(tempdir)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user