From 2707025f0c8d80003b4126ebfea7111297348d61 Mon Sep 17 00:00:00 2001 From: Mathieu Carette Date: Fri, 27 May 2016 18:22:26 +0200 Subject: [PATCH] Improve output on conda environment manipulation --- zappa/zappa.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/zappa/zappa.py b/zappa/zappa.py index f5963dce7..7d3845bac 100644 --- a/zappa/zappa.py +++ b/zappa/zappa.py @@ -420,7 +420,9 @@ def splitpath(path): shutil.copytree(conda_env, temp_package_path, symlinks=True, ignore=shutil.ignore_patterns(*excludes)) # Use conda cli to remove standard packages like python, pip, ... if len(exclude_conda_packages): - subprocess.call(['conda','remove','-p',temp_package_path,'--force','--yes']+exclude_conda_packages) + print('Removing ' + ', '.join(exclude_conda_packages) + ' from conda environment '+ temp_package_path) + subprocess.call(['conda','remove','-p',temp_package_path,'--force','--yes']+exclude_conda_packages, + stdout=open(os.devnull, 'wb'), stderr=open(os.devnull, 'wb')) else: shutil.copytree(conda_env, temp_package_path, symlinks=True) @@ -432,8 +434,10 @@ def splitpath(path): zf.extractall(os.path.join(site_packages)) os.remove(os.path.join(site_packages,egg_file)) # Put site-packages at the root of the environment - copy_tree(site_packages, temp_package_path, update=True) + print('Copying python packages') + copy_tree(site_packages, temp_project_path, update=True) shutil.rmtree(site_packages) + print('Copying remaining binaries') copy_tree(temp_package_path, temp_project_path, update=True) # Then the pre-compiled packages..