示例#1
0
def uninstall(env, lib):
    lib_ = lib.replace('==', '=')  # obviously conda syntax is different
    success = (safe_shell_out(["conda", "remove", lib_, "-p", env.name,
                               "--yes", "--quiet"], cwd=env.toxdir) or
               safe_shell_out([env.pip, "uninstall", lib,
                               "--yes", "--quiet"], cwd=env.toxdir))
    return success
示例#2
0
文件: pkg.py 项目: rmcgibbo/ctox
def install(env, lib):
    lib_ = lib.replace("==", "=")  # obviously conda syntax is different
    success = safe_shell_out(
        ["conda", "install", lib_, "-p", env.name, "--yes", "--quiet"], cwd=env.toxdir
    ) or safe_shell_out([env.pip, "install", "--quiet", lib], cwd=env.toxdir)

    if success:
        with open(env.envctoxfile, "a") as f:
            f.write(" " + lib)
    else:
        cprint("    Unable to install %s." % lib, "err")
    return success
示例#3
0
def install(env, lib):
    lib_ = lib.replace('==', '=')  # obviously conda syntax is different
    success = (safe_shell_out(["conda", "install", lib_, "-p", env.name,
                               "--yes", "--quiet"], cwd=env.toxdir) or
               safe_shell_out([env.pip, "install",
                               "--quiet", lib], cwd=env.toxdir))

    if success:
        with open(env.envctoxfile, 'a') as f:
            f.write(" " + lib)
    else:
        cprint("    Unable to install %s." % lib, 'err')
    return success
示例#4
0
文件: pkg.py 项目: rmcgibbo/ctox
def make_dist(toxinidir, toxdir, package):
    """zip up the package into the toxdir."""
    dist = os.path.join(toxdir, "dist")
    # Suppress warnings.
    success = safe_shell_out(
        ["python", "setup.py", "sdist", "--quiet", "--formats=zip", "--dist-dir", dist], cwd=toxinidir
    )
    if success:
        return os.path.join(dist, package + ".zip")
示例#5
0
def make_dist(toxinidir, toxdir, package):
    """zip up the package into the toxdir."""
    dist = os.path.join(toxdir, "dist")
    # Suppress warnings.
    success = safe_shell_out(["python", "setup.py", "sdist", "--quiet",
                              "--formats=zip", "--dist-dir", dist],
                             cwd=toxinidir)
    if success:
        return os.path.join(dist, package + ".zip")
示例#6
0
def install_dist(env):
    # TODO don't rebuild if not changed?
    # At the moment entire dir is wiped, really we want to update, which would
    # allow us to reuse  previously built files (e.g. pyc) if unchanged...
    # This is usually done in the setup.py into a directory...
    print("installing...")
    return safe_shell_out([env.pip, "install", env.package_zipped,
                           "--no-deps", "--upgrade",
                           # "-t", env.envdistdir,
                           ],
                          cwd=env.toxdir)
示例#7
0
文件: pkg.py 项目: rmcgibbo/ctox
def install_dist(env):
    # TODO don't rebuild if not changed?
    # At the moment entire dir is wiped, really we want to update, which would
    # allow us to reuse  previously built files (e.g. pyc) if unchanged...
    # This is usually done in the setup.py into a directory...
    print("installing...")
    return safe_shell_out(
        [
            env.pip,
            "install",
            env.package_zipped,
            "--no-deps",
            "--upgrade",
            # "-t", env.envdistdir,
        ],
        cwd=env.toxdir,
    )
示例#8
0
文件: pkg.py 项目: rmcgibbo/ctox
def uninstall(env, lib):
    lib_ = lib.replace("==", "=")  # obviously conda syntax is different
    success = safe_shell_out(
        ["conda", "remove", lib_, "-p", env.name, "--yes", "--quiet"], cwd=env.toxdir
    ) or safe_shell_out([env.pip, "uninstall", lib, "--yes", "--quiet"], cwd=env.toxdir)
    return success