jt55401-eddie-cli 0.2.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.
- jt55401_eddie_cli-0.2.0/PKG-INFO +33 -0
- jt55401_eddie_cli-0.2.0/README.md +20 -0
- jt55401_eddie_cli-0.2.0/pyproject.toml +31 -0
- jt55401_eddie_cli-0.2.0/setup.cfg +4 -0
- jt55401_eddie_cli-0.2.0/src/eddie_cli/__init__.py +1 -0
- jt55401_eddie_cli-0.2.0/src/eddie_cli/cli.py +90 -0
- jt55401_eddie_cli-0.2.0/src/jt55401_eddie_cli.egg-info/PKG-INFO +33 -0
- jt55401_eddie_cli-0.2.0/src/jt55401_eddie_cli.egg-info/SOURCES.txt +9 -0
- jt55401_eddie_cli-0.2.0/src/jt55401_eddie_cli.egg-info/dependency_links.txt +1 -0
- jt55401_eddie_cli-0.2.0/src/jt55401_eddie_cli.egg-info/entry_points.txt +2 -0
- jt55401_eddie_cli-0.2.0/src/jt55401_eddie_cli.egg-info/top_level.txt +1 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: jt55401-eddie-cli
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: Cross-platform launcher for the Eddie CLI
|
|
5
|
+
Author: Jason Grey
|
|
6
|
+
License-Expression: GPL-3.0-only
|
|
7
|
+
Project-URL: Homepage, https://github.com/jt55401/eddie
|
|
8
|
+
Project-URL: Repository, https://github.com/jt55401/eddie
|
|
9
|
+
Classifier: Programming Language :: Python :: 3
|
|
10
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
11
|
+
Requires-Python: >=3.9
|
|
12
|
+
Description-Content-Type: text/markdown
|
|
13
|
+
|
|
14
|
+
# jt55401-eddie-cli
|
|
15
|
+
|
|
16
|
+
`jt55401-eddie-cli` exposes the `eddie` command for Python-based workflows.
|
|
17
|
+
|
|
18
|
+
On first run it downloads the native Eddie binary for this package version from:
|
|
19
|
+
|
|
20
|
+
- `https://github.com/jt55401/eddie/releases/tag/v<version>`
|
|
21
|
+
|
|
22
|
+
## Usage
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
python -m pip install jt55401-eddie-cli==0.2.0
|
|
26
|
+
eddie --help
|
|
27
|
+
eddie index --cms mkdocs --content-dir docs --output docs/eddie/index.ed
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Environment
|
|
31
|
+
|
|
32
|
+
- `EDDIE_CLI_CACHE_DIR`: override download/cache directory
|
|
33
|
+
- `EDDIE_CLI_VERSION`: override release version (defaults to package version)
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# jt55401-eddie-cli
|
|
2
|
+
|
|
3
|
+
`jt55401-eddie-cli` exposes the `eddie` command for Python-based workflows.
|
|
4
|
+
|
|
5
|
+
On first run it downloads the native Eddie binary for this package version from:
|
|
6
|
+
|
|
7
|
+
- `https://github.com/jt55401/eddie/releases/tag/v<version>`
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
python -m pip install jt55401-eddie-cli==0.2.0
|
|
13
|
+
eddie --help
|
|
14
|
+
eddie index --cms mkdocs --content-dir docs --output docs/eddie/index.ed
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Environment
|
|
18
|
+
|
|
19
|
+
- `EDDIE_CLI_CACHE_DIR`: override download/cache directory
|
|
20
|
+
- `EDDIE_CLI_VERSION`: override release version (defaults to package version)
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=69", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "jt55401-eddie-cli"
|
|
7
|
+
version = "0.2.0"
|
|
8
|
+
description = "Cross-platform launcher for the Eddie CLI"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.9"
|
|
11
|
+
license = "GPL-3.0-only"
|
|
12
|
+
authors = [
|
|
13
|
+
{ name = "Jason Grey" }
|
|
14
|
+
]
|
|
15
|
+
classifiers = [
|
|
16
|
+
"Programming Language :: Python :: 3",
|
|
17
|
+
"Programming Language :: Python :: 3 :: Only"
|
|
18
|
+
]
|
|
19
|
+
|
|
20
|
+
[project.scripts]
|
|
21
|
+
eddie = "eddie_cli.cli:main"
|
|
22
|
+
|
|
23
|
+
[project.urls]
|
|
24
|
+
Homepage = "https://github.com/jt55401/eddie"
|
|
25
|
+
Repository = "https://github.com/jt55401/eddie"
|
|
26
|
+
|
|
27
|
+
[tool.setuptools]
|
|
28
|
+
package-dir = {"" = "src"}
|
|
29
|
+
|
|
30
|
+
[tool.setuptools.packages.find]
|
|
31
|
+
where = ["src"]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Eddie CLI launcher package."""
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"""Launcher CLI that downloads and executes Eddie release binaries."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import importlib.metadata
|
|
6
|
+
import os
|
|
7
|
+
import platform
|
|
8
|
+
import stat
|
|
9
|
+
import subprocess
|
|
10
|
+
import sys
|
|
11
|
+
import tempfile
|
|
12
|
+
import urllib.request
|
|
13
|
+
from pathlib import Path
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def resolve_asset() -> str:
|
|
17
|
+
system = platform.system().lower()
|
|
18
|
+
machine = platform.machine().lower()
|
|
19
|
+
|
|
20
|
+
if system == "linux" and machine in {"x86_64", "amd64"}:
|
|
21
|
+
return "eddie-linux-amd64"
|
|
22
|
+
if system == "linux" and machine in {"aarch64", "arm64"}:
|
|
23
|
+
return "eddie-linux-arm64"
|
|
24
|
+
if system == "darwin" and machine in {"x86_64", "amd64"}:
|
|
25
|
+
return "eddie-darwin-amd64"
|
|
26
|
+
if system == "darwin" and machine in {"arm64", "aarch64"}:
|
|
27
|
+
return "eddie-darwin-arm64"
|
|
28
|
+
if system == "windows" and machine in {"x86_64", "amd64"}:
|
|
29
|
+
return "eddie-windows-amd64.exe"
|
|
30
|
+
if system == "windows" and machine in {"arm64", "aarch64"}:
|
|
31
|
+
return "eddie-windows-arm64.exe"
|
|
32
|
+
|
|
33
|
+
raise RuntimeError(
|
|
34
|
+
f"Unsupported platform for Eddie CLI: {system}/{machine}. "
|
|
35
|
+
"No release asset mapping is configured."
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def package_version() -> str:
|
|
40
|
+
return os.environ.get("EDDIE_CLI_VERSION") or importlib.metadata.version(
|
|
41
|
+
"jt55401-eddie-cli"
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
def cache_root() -> Path:
|
|
46
|
+
root = os.environ.get("EDDIE_CLI_CACHE_DIR")
|
|
47
|
+
if root:
|
|
48
|
+
return Path(root)
|
|
49
|
+
return Path.home() / ".cache" / "eddie-cli"
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
def ensure_binary(version: str) -> Path:
|
|
53
|
+
asset = resolve_asset()
|
|
54
|
+
is_windows = asset.endswith(".exe")
|
|
55
|
+
binary_name = "eddie.exe" if is_windows else "eddie"
|
|
56
|
+
version_dir = cache_root() / version
|
|
57
|
+
binary_path = version_dir / binary_name
|
|
58
|
+
|
|
59
|
+
if binary_path.exists():
|
|
60
|
+
binary_path.chmod(binary_path.stat().st_mode | stat.S_IXUSR | stat.S_IXGRP | stat.S_IXOTH)
|
|
61
|
+
return binary_path
|
|
62
|
+
|
|
63
|
+
version_dir.mkdir(parents=True, exist_ok=True)
|
|
64
|
+
url = f"https://github.com/jt55401/eddie/releases/download/v{version}/{asset}"
|
|
65
|
+
|
|
66
|
+
with tempfile.NamedTemporaryFile(dir=version_dir, delete=False) as tmp:
|
|
67
|
+
temp_path = Path(tmp.name)
|
|
68
|
+
|
|
69
|
+
try:
|
|
70
|
+
print(f"Downloading Eddie CLI {version} ({asset})...", file=sys.stderr)
|
|
71
|
+
with urllib.request.urlopen(url) as response, temp_path.open("wb") as out:
|
|
72
|
+
out.write(response.read())
|
|
73
|
+
temp_path.chmod(temp_path.stat().st_mode | stat.S_IXUSR | stat.S_IXGRP | stat.S_IXOTH)
|
|
74
|
+
temp_path.replace(binary_path)
|
|
75
|
+
finally:
|
|
76
|
+
if temp_path.exists():
|
|
77
|
+
temp_path.unlink()
|
|
78
|
+
|
|
79
|
+
return binary_path
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
def main() -> int:
|
|
83
|
+
version = package_version()
|
|
84
|
+
binary = ensure_binary(version)
|
|
85
|
+
result = subprocess.run([os.fspath(binary), *sys.argv[1:]], check=False)
|
|
86
|
+
return result.returncode
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
if __name__ == "__main__":
|
|
90
|
+
raise SystemExit(main())
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: jt55401-eddie-cli
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: Cross-platform launcher for the Eddie CLI
|
|
5
|
+
Author: Jason Grey
|
|
6
|
+
License-Expression: GPL-3.0-only
|
|
7
|
+
Project-URL: Homepage, https://github.com/jt55401/eddie
|
|
8
|
+
Project-URL: Repository, https://github.com/jt55401/eddie
|
|
9
|
+
Classifier: Programming Language :: Python :: 3
|
|
10
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
11
|
+
Requires-Python: >=3.9
|
|
12
|
+
Description-Content-Type: text/markdown
|
|
13
|
+
|
|
14
|
+
# jt55401-eddie-cli
|
|
15
|
+
|
|
16
|
+
`jt55401-eddie-cli` exposes the `eddie` command for Python-based workflows.
|
|
17
|
+
|
|
18
|
+
On first run it downloads the native Eddie binary for this package version from:
|
|
19
|
+
|
|
20
|
+
- `https://github.com/jt55401/eddie/releases/tag/v<version>`
|
|
21
|
+
|
|
22
|
+
## Usage
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
python -m pip install jt55401-eddie-cli==0.2.0
|
|
26
|
+
eddie --help
|
|
27
|
+
eddie index --cms mkdocs --content-dir docs --output docs/eddie/index.ed
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Environment
|
|
31
|
+
|
|
32
|
+
- `EDDIE_CLI_CACHE_DIR`: override download/cache directory
|
|
33
|
+
- `EDDIE_CLI_VERSION`: override release version (defaults to package version)
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
README.md
|
|
2
|
+
pyproject.toml
|
|
3
|
+
src/eddie_cli/__init__.py
|
|
4
|
+
src/eddie_cli/cli.py
|
|
5
|
+
src/jt55401_eddie_cli.egg-info/PKG-INFO
|
|
6
|
+
src/jt55401_eddie_cli.egg-info/SOURCES.txt
|
|
7
|
+
src/jt55401_eddie_cli.egg-info/dependency_links.txt
|
|
8
|
+
src/jt55401_eddie_cli.egg-info/entry_points.txt
|
|
9
|
+
src/jt55401_eddie_cli.egg-info/top_level.txt
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
eddie_cli
|