Beispiel #1
0
def test_require_conda():
    if conda.is_conda_installed():
        prefix = conda.get_sysprefix()
        run('rm -rf ' + utils.abspath(prefix))
        assert conda.is_conda_installed() == False
    require.conda.conda()
    assert conda.is_conda_installed()
Beispiel #2
0
def test_require_conda():
     if conda.is_conda_installed():
         prefix = conda.get_sysprefix()
         run('rm -rf ' + utils.abspath(prefix))
         assert conda.is_conda_installed() == False
     require.conda.conda()
     assert conda.is_conda_installed()
Beispiel #3
0
def test_conda_install_and_check():
    assert conda.is_conda_installed() == False
    conda.install_miniconda(keep_installer=True)
    assert conda.is_conda_installed()
    run('rm -rf miniconda')
    assert conda.is_conda_installed() == False
    conda.install_miniconda(prefix='~/myminiconda', keep_installer=True)
    assert conda.get_sysprefix() == utils.abspath('myminiconda')
    assert conda.is_conda_installed()
    run('rm -rf myminiconda')
    assert conda.is_conda_installed() == False
    conda.install_miniconda(keep_installer=True)
Beispiel #4
0
def test_conda_install_and_check():
    assert conda.is_conda_installed() == False
    conda.install_miniconda(keep_installer=True)
    assert conda.is_conda_installed()
    run('rm -rf miniconda')
    assert conda.is_conda_installed() == False
    conda.install_miniconda(prefix='~/myminiconda', keep_installer=True)
    assert conda.get_sysprefix() == utils.abspath('myminiconda')
    assert conda.is_conda_installed()
    run('rm -rf myminiconda')
    assert conda.is_conda_installed() == False
    conda.install_miniconda(keep_installer=True)
Beispiel #5
0
def conda(prefix='~/miniconda', use_sudo=False):
    """
    Require conda to be installed.

    If conda is not installed the latest version of miniconda will be installed.

    :param prefix: prefix for the miniconda installation
    :param use_sudo: use sudo for this operation
    """
    if not is_conda_installed():
        install_miniconda(prefix=prefix, use_sudo=use_sudo)
Beispiel #6
0
def conda(prefix='~/miniconda', use_sudo=False):
    """
    Require conda to be installed.

    If conda is not installed the latest version of miniconda will be installed.

    :param prefix: prefix for the miniconda installation
    :param use_sudo: use sudo for this operation
    """
    if not is_conda_installed():
        install_miniconda(prefix=prefix, use_sudo=use_sudo)