korvus-browser 152.0.0__tar.gz

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,23 @@
1
+ Metadata-Version: 2.4
2
+ Name: korvus-browser
3
+ Version: 152.0.0
4
+ Summary: Launcher for the korvus browser engine (downloads and runs the matching release binary)
5
+ Author: Trevor Kang
6
+ License: BUSL-1.1 — see the project LICENSE
7
+ Project-URL: Homepage, https://github.com/KorvusBrowser/korvus-browser
8
+ Requires-Python: >=3.9
9
+ Description-Content-Type: text/markdown
10
+
11
+ # korvus-browser (Python launcher)
12
+
13
+ `pip install korvus-browser` gives you a `korvus` command that downloads the matching korvus engine
14
+ binary from this project's GitHub Release (cached under `~/.cache/korvus-browser/`) and runs it.
15
+
16
+ ```
17
+ pip install korvus-browser
18
+ korvus serve
19
+ ```
20
+
21
+ The engine itself is under the Business Source License 1.1 (see the repository `LICENSE`); this launcher
22
+ is a thin convenience wrapper. **MVP/template** — finalize alongside `.github/workflows/release.yml`
23
+ (asset names, checksum verification, Windows path) before publishing to PyPI.
@@ -0,0 +1,13 @@
1
+ # korvus-browser (Python launcher)
2
+
3
+ `pip install korvus-browser` gives you a `korvus` command that downloads the matching korvus engine
4
+ binary from this project's GitHub Release (cached under `~/.cache/korvus-browser/`) and runs it.
5
+
6
+ ```
7
+ pip install korvus-browser
8
+ korvus serve
9
+ ```
10
+
11
+ The engine itself is under the Business Source License 1.1 (see the repository `LICENSE`); this launcher
12
+ is a thin convenience wrapper. **MVP/template** — finalize alongside `.github/workflows/release.yml`
13
+ (asset names, checksum verification, Windows path) before publishing to PyPI.
@@ -0,0 +1,5 @@
1
+ """korvus-browser launcher package. See __main__.py."""
2
+ from .__main__ import main
3
+
4
+ __version__ = "152.0.0"
5
+ __all__ = ["main"]
@@ -0,0 +1,86 @@
1
+ """korvus-browser — a thin launcher that fetches the matching korvus engine binary and runs it.
2
+
3
+ TEMPLATE / MVP (release infra): on first run this downloads the platform binary from this project's
4
+ GitHub Release, caches it under ~/.cache/korvus-browser/<version>/, and execs it; later runs reuse the
5
+ cache. Finalize alongside .github/workflows/release.yml: confirm the release asset names match, add
6
+ SHA256 verification against the release's SHA256SUMS, and test the Windows (.zip) path. The release
7
+ tarball is expected to contain the `korvus` binary together with its sibling libraries (libGLESv2/libEGL,
8
+ Skia), which korvus loads from beside the executable.
9
+ """
10
+ from __future__ import annotations
11
+
12
+ import os
13
+ import platform
14
+ import sys
15
+ import tarfile
16
+ import tempfile
17
+ import urllib.request
18
+ import zipfile
19
+ from pathlib import Path
20
+
21
+ VERSION = "152.0.0" # kept in sync with the engine release tag (v<VERSION>)
22
+ REPO = "KorvusBrowser/korvus-browser"
23
+
24
+
25
+ def _asset() -> tuple[str, str]:
26
+ # Asset names match the release's install.sh / install.ps1 — unversioned, so install.sh's
27
+ # /latest/download/<name> works for any version: korvus-linux-x86_64.tar.gz, korvus-macos-arm64.tar.gz,
28
+ # korvus-windows-x86_64.zip. The launcher downloads them from the version-specific release dir below.
29
+ system, mach = platform.system(), platform.machine().lower()
30
+ if system == "Linux":
31
+ if mach not in ("x86_64", "amd64"):
32
+ raise SystemExit(f"korvus: no Linux build for {mach!r} yet (linux-x86_64 only)")
33
+ return "korvus-linux-x86_64.tar.gz", "korvus"
34
+ if system == "Darwin":
35
+ return "korvus-macos-arm64.tar.gz", "korvus" # arm64 build; Rosetta runs it on Intel Macs
36
+ if system == "Windows":
37
+ return "korvus-windows-x86_64.zip", "korvus.exe"
38
+ raise SystemExit(f"korvus: unsupported OS {system!r}")
39
+
40
+
41
+ def _ensure_binary() -> Path:
42
+ asset, exe = _asset()
43
+ root = Path(os.environ.get("KORVUS_CACHE") or (Path.home() / ".cache" / "korvus-browser")) / VERSION
44
+ binary = root / exe
45
+ if binary.exists():
46
+ return binary
47
+ root.mkdir(parents=True, exist_ok=True)
48
+ url = f"https://github.com/{REPO}/releases/download/v{VERSION}/{asset}"
49
+ suffix = asset[asset.rfind("."):]
50
+ try:
51
+ with urllib.request.urlopen(url) as resp: # noqa: S310 (fixed, trusted host)
52
+ data = resp.read()
53
+ except Exception as e: # pragma: no cover
54
+ raise SystemExit(f"korvus: could not download {url}: {e}")
55
+ with tempfile.NamedTemporaryFile(delete=False, suffix=suffix) as tmp:
56
+ tmp.write(data)
57
+ archive = tmp.name
58
+ try:
59
+ if asset.endswith(".zip"):
60
+ with zipfile.ZipFile(archive) as z:
61
+ z.extractall(root)
62
+ else:
63
+ with tarfile.open(archive) as t:
64
+ t.extractall(root)
65
+ finally:
66
+ os.unlink(archive)
67
+ if not binary.exists():
68
+ found = next(iter(root.rglob(exe)), None)
69
+ if found is None:
70
+ raise SystemExit(f"korvus: {exe} not found in {asset}")
71
+ binary = found
72
+ binary.chmod(0o755)
73
+ return binary
74
+
75
+
76
+ def main() -> None:
77
+ binary = _ensure_binary()
78
+ argv = [str(binary), *sys.argv[1:]]
79
+ if os.name == "nt":
80
+ import subprocess
81
+ raise SystemExit(subprocess.call(argv))
82
+ os.execv(str(binary), argv)
83
+
84
+
85
+ if __name__ == "__main__":
86
+ main()
@@ -0,0 +1,23 @@
1
+ Metadata-Version: 2.4
2
+ Name: korvus-browser
3
+ Version: 152.0.0
4
+ Summary: Launcher for the korvus browser engine (downloads and runs the matching release binary)
5
+ Author: Trevor Kang
6
+ License: BUSL-1.1 — see the project LICENSE
7
+ Project-URL: Homepage, https://github.com/KorvusBrowser/korvus-browser
8
+ Requires-Python: >=3.9
9
+ Description-Content-Type: text/markdown
10
+
11
+ # korvus-browser (Python launcher)
12
+
13
+ `pip install korvus-browser` gives you a `korvus` command that downloads the matching korvus engine
14
+ binary from this project's GitHub Release (cached under `~/.cache/korvus-browser/`) and runs it.
15
+
16
+ ```
17
+ pip install korvus-browser
18
+ korvus serve
19
+ ```
20
+
21
+ The engine itself is under the Business Source License 1.1 (see the repository `LICENSE`); this launcher
22
+ is a thin convenience wrapper. **MVP/template** — finalize alongside `.github/workflows/release.yml`
23
+ (asset names, checksum verification, Windows path) before publishing to PyPI.
@@ -0,0 +1,9 @@
1
+ README.md
2
+ pyproject.toml
3
+ korvus_browser/__init__.py
4
+ korvus_browser/__main__.py
5
+ korvus_browser.egg-info/PKG-INFO
6
+ korvus_browser.egg-info/SOURCES.txt
7
+ korvus_browser.egg-info/dependency_links.txt
8
+ korvus_browser.egg-info/entry_points.txt
9
+ korvus_browser.egg-info/top_level.txt
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ korvus = korvus_browser.__main__:main
@@ -0,0 +1 @@
1
+ korvus_browser
@@ -0,0 +1,21 @@
1
+ [build-system]
2
+ requires = ["setuptools>=68"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "korvus-browser"
7
+ version = "152.0.0"
8
+ description = "Launcher for the korvus browser engine (downloads and runs the matching release binary)"
9
+ readme = "README.md"
10
+ requires-python = ">=3.9"
11
+ license = { text = "BUSL-1.1 — see the project LICENSE" }
12
+ authors = [{ name = "Trevor Kang" }]
13
+
14
+ [project.urls]
15
+ Homepage = "https://github.com/KorvusBrowser/korvus-browser"
16
+
17
+ [project.scripts]
18
+ korvus = "korvus_browser.__main__:main"
19
+
20
+ [tool.setuptools]
21
+ packages = ["korvus_browser"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+