mirror of
https://github.com/daylinmorgan/viv.git
synced 2024-12-22 02:30:44 -06:00
docs: update black with revised standalone
This commit is contained in:
parent
dbc22489e6
commit
92da092791
1 changed files with 5 additions and 4 deletions
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# AUTOGENERATED by viv (v23.5a5-2-ge70afb3-dev)
|
# AUTOGENERATED by viv (v23.5a5-9-g33e2ff5-dev)
|
||||||
# see `python3 <(curl -fsSL viv.dayl.in/viv.py) --help`
|
# see `python3 <(curl -fsSL viv.dayl.in/viv.py) --help`
|
||||||
|
|
||||||
|
|
||||||
|
@ -22,9 +22,10 @@ def _viv_use(*pkgs, track_exe=False, name=""):
|
||||||
_id = sha256.hexdigest()
|
_id = sha256.hexdigest()
|
||||||
if (env := cache / (name if name else _id)) not in cache.glob("*/") or force:
|
if (env := cache / (name if name else _id)) not in cache.glob("*/") or force:
|
||||||
sys.stderr.write(f"generating new vivenv -> {env.name}\n")
|
sys.stderr.write(f"generating new vivenv -> {env.name}\n")
|
||||||
venv.create(env, symlinks=True, with_pip=True, clear=True, upgrade_deps=True)
|
venv.create(env, symlinks=True, clear=True)
|
||||||
run_kw = dict(zip(("stdout", "stderr"), ((None,) * 2 if verbose else (-1, 2))))
|
kw = dict(zip(("stdout", "stderr"), ((None,) * 2 if verbose else (-1, 2))))
|
||||||
p = run([env / "bin" / "pip", "install", "--force-reinstall", *spec], **run_kw)
|
cmd = ["pip", "--python", str(env / "bin" / "python"), "install", *spec]
|
||||||
|
p = run(cmd, **kw)
|
||||||
if (rc := p.returncode) != 0:
|
if (rc := p.returncode) != 0:
|
||||||
if env.is_dir():
|
if env.is_dir():
|
||||||
shutil.rmtree(env)
|
shutil.rmtree(env)
|
||||||
|
|
Loading…
Reference in a new issue