Skip to content

Commit

Permalink
Improve output on conda environment manipulation
Browse files Browse the repository at this point in the history
  • Loading branch information
mathieu1 committed Nov 27, 2016
1 parent 4d0e845 commit 2707025
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions zappa/zappa.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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..
Expand Down

0 comments on commit 2707025

Please sign in to comment.