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
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
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
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")
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")
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)
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, )
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