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 Jan 6, 2017
1 parent 78a900f commit cd91ce5
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 @@ -444,7 +444,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 @@ -456,8 +458,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 cd91ce5

Please sign in to comment.