mirror of
https://github.com/Chia-Network/chia-blockchain.git
synced 2024-11-09 17:36:14 +03:00
3b084a165b
* configure isort to add the future annotations import * apply the new isort setting * remove type ignores for new mypy (#13539) https://pypi.org/project/mypy/0.981/ * another
31 lines
630 B
Python
Executable File
31 lines
630 B
Python
Executable File
#!/usr/bin/env python3
|
|
|
|
from __future__ import annotations
|
|
|
|
import os
|
|
import pathlib
|
|
import subprocess
|
|
import sys
|
|
|
|
here = pathlib.Path(__file__).parent
|
|
|
|
|
|
def main(*args: str) -> int:
|
|
if len(args) == 0:
|
|
print("Parameters required")
|
|
return 1
|
|
|
|
if sys.platform == "win32":
|
|
script = "activated.ps1"
|
|
command = ["powershell", os.fspath(here.joinpath(script)), *args]
|
|
else:
|
|
script = "activated.sh"
|
|
command = ["sh", os.fspath(here.joinpath(script)), *args]
|
|
|
|
completed_process = subprocess.run(command)
|
|
|
|
return completed_process.returncode
|
|
|
|
|
|
sys.exit(main(*sys.argv[1:]))
|