def add_condarc(info):
    channels = info.get('conda_default_channels')
    if channels:
        yield '# ----- add condarc'
        yield 'cat <<EOF >$PREFIX/.condarc'
        yield 'default_channels:'
        for url in channels:
            yield '  - %s' % url
        yield 'EOF'
dataset/ETHPy150Open conda/constructor/constructor/shar.py/add_condarc/original