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.
- speedrunpapi/__init__.py +2 -0
- speedrunpapi/__main__.py +4 -0
- speedrunpapi/cli.py +21 -0
- speedrunpapi/speedrunpapi.mjs +1598 -0
- speedrunpapi-0.3.2.dist-info/METADATA +22 -0
- speedrunpapi-0.3.2.dist-info/RECORD +10 -0
- speedrunpapi-0.3.2.dist-info/WHEEL +5 -0
- speedrunpapi-0.3.2.dist-info/entry_points.txt +2 -0
- speedrunpapi-0.3.2.dist-info/licenses/LICENSE.md +5 -0
- speedrunpapi-0.3.2.dist-info/top_level.txt +1 -0
speedrunpapi/__init__.py
ADDED
speedrunpapi/__main__.py
ADDED
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())
|