conda-devenv
is conda
extension to work with multiple projects in development mode.
It works by processing environment.devenv.yml
files, similar to how conda env
processes environment.yml
files, with this additional features:
- Jinja 2 support: gives more flexibility to the environment definition, for example making it simple to conditionally add dependencies based on platform.
include
otherenvironment.devenv.yml
files: this allows you to easily work in several dependent projects at the same time, managing a singleconda
environment with your dependencies.- Environment variables: you can define a
environment:
section with environment variables that should be defined when the environment is activated.
Here's a simple environment.devenv.yml
file:
{% set conda_py = os.environ.get('CONDA_PY', '35') %}
name: web-ui-py{{ conda_py }}
includes:
- {{ root }}/../core-business/environment.devenv.yml
dependencies:
- gcc # [linux]
environment:
PYTHONPATH:
- {{ root }}/src
STAGE: DEVELOPMENT
To use this file, execute:
$ cd ~/projects/web-ui
$ conda devenv
> Executing: conda env update --file environment.yml --prune
Fetching package metadata .........
Solving package specifications: ..........
Linking packages ...
[ COMPLETE ]|############################| 100%
#
# To activate this environment, use:
# > source activate web-ui-py35
#
# To deactivate this environment, use:
# > source deactivate web-ui-py35
#
$ source activate web-ui-py35
$ env PYTHONPATH
/home/user/projects/web-ui/src
$ echo $STAGE
DEVELOPMENT
https://conda-devenv.readthedocs.io.
Please see CONTRIBUTING.
Free software: MIT license