speedrunpapi 0.3.2__py3-none-any.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.
@@ -0,0 +1,2 @@
1
+ """Python console entry to the shared ᑕ. arithmetic analyzer."""
2
+ __version__ = "0.3.2"
@@ -0,0 +1,4 @@
1
+ from .cli import main
2
+
3
+ if __name__ == '__main__':
4
+ raise SystemExit(main())
speedrunpapi/cli.py ADDED
@@ -0,0 +1,21 @@
1
+ """Run the bundled Colony analyzer with no network install step."""
2
+ from __future__ import annotations
3
+
4
+ import shutil
5
+ import subprocess
6
+ import sys
7
+ from importlib import resources
8
+
9
+
10
+ def main() -> int:
11
+ node = shutil.which("node") or shutil.which("nodejs")
12
+ if not node:
13
+ print("ᑕ. requires Node.js 20 or later on PATH.", file=sys.stderr)
14
+ return 127
15
+ bundled = resources.files("speedrunpapi").joinpath("speedrunpapi.mjs")
16
+ with resources.as_file(bundled) as file_path:
17
+ return subprocess.run([node, str(file_path), *sys.argv[1:]], check=False).returncode
18
+
19
+
20
+ if __name__ == "__main__":
21
+ raise SystemExit(main())