def get_dependencies(env_yml_file):
import yaml<EOL>with open_here(env_yml_file) as f:<EOL><INDENT>environment = yaml.load(f)<EOL><DEDENT>conda_dependencies = []<EOL>package_map = {<EOL>'<STR_LIT>': '<STR_LIT>',  <EOL>'<STR_LIT>': '<STR_LIT>',<EOL>'<STR_LIT>': '<STR_LIT>',<EOL>'<STR_LIT>': '<STR_LIT>',<EOL>}<EOL>for dep in environment['<STR_LIT>']:<EOL><INDENT>if isinstance(dep, str) and not(dep.startswith('<STR_LIT>')):<EOL><INDENT>if dep in package_map:<EOL><INDENT>conda_dependencies.append(package_map[dep])<EOL><DEDENT>else:<EOL><INDENT>conda_dependencies.append(dep)<EOL><DEDENT><DEDENT>elif isinstance(dep, dict) and '<STR_LIT>' in dep:<EOL><INDENT>pip_dependencies = dep['<STR_LIT>']<EOL><DEDENT><DEDENT>return conda_dependencies + pip_dependencies<EOL>
Read the dependencies from a Conda environment file in YAML
and return a list of such dependencies (from conda and pip list)
Be sure to match packages specification for each of:
- Conda : http://conda.pydata.org/docs/spec.html#build-version-spec
- Pip & Setuptool :
   - http://pythonhosted.org/setuptools/setuptools.html?highlight=install_require#declaring-dependencies
   - https://pythonhosted.org/setuptools/pkg_resources.html#requirement-objects