mirror of
https://github.com/daylinmorgan/viv.git
synced 2024-12-22 10:40:44 -06:00
feat: add shim proof of concept
This commit is contained in:
parent
ddb03df8a2
commit
ed8a4458c9
1 changed files with 33 additions and 0 deletions
33
examples/black
Executable file
33
examples/black
Executable file
|
@ -0,0 +1,33 @@
|
||||||
|
#!/usr/bin/env python3
|
||||||
|
"""
|
||||||
|
Proof of concept output for a 'shim generator'
|
||||||
|
that would essentially emulate pipx
|
||||||
|
|
||||||
|
A possible cli signature
|
||||||
|
|
||||||
|
viv shim black -o ~/bin/black
|
||||||
|
"""
|
||||||
|
|
||||||
|
import sys
|
||||||
|
|
||||||
|
sys.path.append("/home/daylin/.viv/src") # noqa
|
||||||
|
import subprocess
|
||||||
|
import viv
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
vivenv = viv.use(
|
||||||
|
"black==23.3.0",
|
||||||
|
"click==8.1.3",
|
||||||
|
"mypy-extensions==1.0.0",
|
||||||
|
"packaging==23.1",
|
||||||
|
"pathspec==0.11.1",
|
||||||
|
"platformdirs==3.5.1",
|
||||||
|
)
|
||||||
|
sys.exit(
|
||||||
|
subprocess.run(
|
||||||
|
[
|
||||||
|
vivenv.path / "bin" / "black",
|
||||||
|
*sys.argv[1:],
|
||||||
|
]
|
||||||
|
).returncode
|
||||||
|
)
|
Loading…
Reference in a new issue