pios-cli 0.5.1__py3-none-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
pios_cli/__init__.py
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.5.1"
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"""公开原生 wheel 的薄启动器;不下载、不执行网络脚本、不回退到源码。"""
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
|
|
4
|
+
import os
|
|
5
|
+
import subprocess
|
|
6
|
+
import sys
|
|
7
|
+
from pathlib import Path
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def native_binary() -> Path:
|
|
11
|
+
name = "pios-core.exe" if sys.platform == "win32" else "pios-core"
|
|
12
|
+
return Path(__file__).with_name("native").joinpath("bin", name)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def main() -> None:
|
|
16
|
+
binary = native_binary()
|
|
17
|
+
if not binary.is_file():
|
|
18
|
+
sys.stderr.write("pios 原生核心缺失,请重新安装当前平台的 pios-cli wheel。\n")
|
|
19
|
+
raise SystemExit(1)
|
|
20
|
+
env = {**os.environ, "PIOS_NATIVE_EXECUTABLE": str(binary.resolve())}
|
|
21
|
+
try:
|
|
22
|
+
completed = subprocess.run([str(binary), *sys.argv[1:]], check=False, env=env)
|
|
23
|
+
except KeyboardInterrupt:
|
|
24
|
+
raise SystemExit(130) from None
|
|
25
|
+
except OSError as exc:
|
|
26
|
+
sys.stderr.write(f"无法启动 pios 原生核心:{exc}\n")
|
|
27
|
+
raise SystemExit(1) from None
|
|
28
|
+
raise SystemExit(completed.returncode)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
if __name__ == "__main__":
|
|
32
|
+
main()
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
pios_cli/__init__.py,sha256=eZ1bOun1DDVV0YLOBW4wj2FP1ajReLjbIrGmzN7ASBw,22
|
|
2
|
+
pios_cli/native_launcher.py,sha256=bPOmua3vPzRvJ2SmJ-vxAJFSsILXXPIYGd1dFxU_SoM,1042
|
|
3
|
+
pios_cli/native/bin/pios-core.exe,sha256=ZVpixG10Wl-xODZuelT0sadYiq7SOGoNTp5WafJnqaM,43211264
|
|
4
|
+
pios_cli-0.5.1.dist-info/METADATA,sha256=zMTU6Qv_4-Jbc74GmcG_Bs4MRL1BQJQzsz5As4BD9nI,245
|
|
5
|
+
pios_cli-0.5.1.dist-info/WHEEL,sha256=dqu_flpgErUGQXqztw6HKpn7AJNivAI1myXBJCiQRlY,97
|
|
6
|
+
pios_cli-0.5.1.dist-info/entry_points.txt,sha256=aJQxjQ35mb1d880Q9C8lBWa8uA1xgj1lZa9ZSY3d7Ss,55
|
|
7
|
+
pios_cli-0.5.1.dist-info/RECORD,,
|