Example #1
0
def install_gemini(env):
    """A lightweight db framework for disease and population genetics.
    https://github.com/arq5x/gemini
    """
    version = "0.6.4"
    if versioncheck.up_to_date(env, "gemini -v", version,
                               stdout_flag="gemini"):
        return
    elif not shared._executable_not_on_path("gemini -v"):
        env.safe_run("gemini update")
    else:
        iurl = "https://raw.github.com/arq5x/gemini/master/gemini/scripts/gemini_install.py"
        data_dir = os.path.join(
            env.system_install,
            "local" if env.system_install.find("/local") == -1 else "",
            "share", "gemini")
        with _make_tmp_dir(ext="-gemini") as work_dir:
            with cd(work_dir):
                if env.safe_exists(os.path.basename(iurl)):
                    env.safe_run("rm -f %s" % os.path.basename(iurl))
                installer = shared._remote_fetch(env, iurl)
                env.safe_run("%s %s %s %s %s" %
                             (_python_cmd(env), installer, "" if env.use_sudo
                              else "--nosudo", env.system_install, data_dir))
                env.safe_run("rm -f gemini_install.py")
Example #2
0
 def _gemini_install(env):
     env.safe_sudo("{0} install --upgrade cython".format(_pip_cmd(env)))
     env.safe_sudo("{0} install --upgrade distribute".format(_pip_cmd(env)))
     _python_make(env)
     env.safe_sudo("mkdir -p {0}".format(data_dir))
     env.safe_sudo("chown {0} {1}".format(env.user, data_dir))
     run("{0} gemini/install-data.py {1}".format(_python_cmd(env), data_dir))
     env.safe_sudo("rm -rf gemini.egg-info")
Example #3
0
def install_gemini(env):
    """A lightweight db framework for disease and population genetics.
    https://github.com/arq5x/gemini
    """
    version = "github"
    installer = "https://raw.github.com/arq5x/gemini/master/gemini/scripts/gemini_install.py"
    data_dir = os.path.join(env.system_install, "local", "share", "gemini")
    with _make_tmp_dir() as work_dir:
        with cd(work_dir):
            env.safe_run("wget --no-check-certificate %s" % installer)
            env.safe_run("%s gemini_install.py %s %s %s" %
                         (_python_cmd(env), "" if env.use_sudo else "--nosudo",
                          env.system_install, data_dir))
            env.safe_run("rm -f gemini_install.py")
Example #4
0
def install_gemini(env):
    """A lightweight db framework for disease and population genetics.
    https://github.com/arq5x/gemini
    """
    version = "github"
    installer = "https://raw.github.com/arq5x/gemini/master/gemini/scripts/gemini_install.py"
    data_dir = os.path.join(env.system_install, "local", "share", "gemini")
    with _make_tmp_dir() as work_dir:
        with cd(work_dir):
            env.safe_run("wget --no-check-certificate %s" % installer)
            env.safe_run("%s gemini_install.py %s %s %s" %
                         (_python_cmd(env), "" if env.use_sudo else "--nosudo",
                          env.system_install, data_dir))
            env.safe_run("rm -f gemini_install.py")
Example #5
0
def install_gemini(env):
    """A lightweight db framework for disease and population genetics.
    https://github.com/arq5x/gemini
    """
    version = "0.6.1"
    if versioncheck.up_to_date(env, "gemini -v", version, stdout_flag="gemini"):
        return
    elif not shared._executable_not_on_path("gemini -v"):
        env.safe_run("gemini update")
    else:
        iurl = "https://raw.github.com/arq5x/gemini/master/gemini/scripts/gemini_install.py"
        data_dir = os.path.join(env.system_install,
                                "local" if env.system_install.find("/local") == -1 else "",
                                "share", "gemini")
        with _make_tmp_dir(ext="-gemini") as work_dir:
            with cd(work_dir):
                if env.safe_exists(os.path.basename(iurl)):
                    env.safe_run("rm -f %s" % os.path.basename(iurl))
                installer = shared._remote_fetch(env, iurl)
                env.safe_run("%s %s %s %s %s" %
                             (_python_cmd(env), installer, "" if env.use_sudo else "--nosudo",
                              env.system_install, data_dir))
                env.safe_run("rm -f gemini_install.py")