Compare commits
No commits in common. "a3cf76b28a47700da4faeac4534d99dc4862a09a" and "d14ae1725e68220699032331b9a0f3a6849acaf0" have entirely different histories.
a3cf76b28a
...
d14ae1725e
2 changed files with 9 additions and 10 deletions
|
@ -3,10 +3,8 @@
|
||||||
__version__ = "0.0.1"
|
__version__ = "0.0.1"
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
from os import environ, pathsep
|
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
import env
|
|
||||||
from rwx import fs
|
from rwx import fs
|
||||||
from rwx.log import stream as log
|
from rwx.log import stream as log
|
||||||
from rwx.ps import run
|
from rwx.ps import run
|
||||||
|
@ -63,9 +61,6 @@ def list_environment_variables() -> None:
|
||||||
|
|
||||||
|
|
||||||
def main(main: str) -> None:
|
def main(main: str) -> None:
|
||||||
paths = environ["PATH"].split(pathsep)
|
|
||||||
if env.SPCD_PYTHON_VENV_BINARIES not in paths:
|
|
||||||
environ["PATH"] = pathsep.join([env.SPCD_PYTHON_VENV_BINARIES, *paths])
|
|
||||||
path, *arguments = sys.argv
|
path, *arguments = sys.argv
|
||||||
name = Path(path).name
|
name = Path(path).name
|
||||||
if name == "__main__.py":
|
if name == "__main__.py":
|
||||||
|
|
|
@ -2,13 +2,17 @@
|
||||||
|
|
||||||
"""Entry point."""
|
"""Entry point."""
|
||||||
|
|
||||||
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
import env
|
import env
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if env.SPCD_PYTHON_VENV_PACKAGES not in sys.path:
|
||||||
if env.SPCD_PYTHON_VENV_PACKAGES not in sys.path:
|
|
||||||
sys.path.insert(0, env.SPCD_PYTHON_VENV_PACKAGES)
|
sys.path.insert(0, env.SPCD_PYTHON_VENV_PACKAGES)
|
||||||
from spcd import main
|
import spcd
|
||||||
|
|
||||||
main(__file__)
|
if __name__ == "__main__":
|
||||||
|
os.environ["PATH"] = os.pathsep.join(
|
||||||
|
[env.SPCD_PYTHON_VENV_BINARIES, os.environ["PATH"]]
|
||||||
|
)
|
||||||
|
spcd.main(__file__)
|
||||||
|
|
Loading…
Reference in a new issue