codetwin 0.1.9__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.
- codetwin/__init__.py +3 -0
- codetwin/__main__.py +4 -0
- codetwin/_bin/.gitkeep +0 -0
- codetwin/_bin/codetwin-aarch64-darwin +0 -0
- codetwin/cli.py +40 -0
- codetwin-0.1.9.dist-info/METADATA +11 -0
- codetwin-0.1.9.dist-info/RECORD +9 -0
- codetwin-0.1.9.dist-info/WHEEL +4 -0
- codetwin-0.1.9.dist-info/entry_points.txt +3 -0
codetwin/__init__.py
ADDED
codetwin/__main__.py
ADDED
codetwin/_bin/.gitkeep
ADDED
|
File without changes
|
|
Binary file
|
codetwin/cli.py
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import os
|
|
2
|
+
import platform
|
|
3
|
+
import subprocess
|
|
4
|
+
import sys
|
|
5
|
+
from pathlib import Path
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
def get_binary_path() -> Path:
|
|
9
|
+
"""Get path to compiled binary for current platform."""
|
|
10
|
+
system = sys.platform
|
|
11
|
+
machine = platform.machine().lower()
|
|
12
|
+
|
|
13
|
+
if system == "darwin":
|
|
14
|
+
if machine in {"arm64", "aarch64"}:
|
|
15
|
+
binary = "codetwin-aarch64-darwin"
|
|
16
|
+
else:
|
|
17
|
+
binary = "codetwin-x86_64-darwin"
|
|
18
|
+
elif system.startswith("linux"):
|
|
19
|
+
if machine in {"aarch64", "arm64"}:
|
|
20
|
+
binary = "codetwin-aarch64-linux-gnu"
|
|
21
|
+
else:
|
|
22
|
+
binary = "codetwin-x86_64-linux-gnu"
|
|
23
|
+
else:
|
|
24
|
+
raise RuntimeError(f"Unsupported platform: {system}")
|
|
25
|
+
|
|
26
|
+
path = Path(__file__).parent / "_bin" / binary
|
|
27
|
+
if not path.exists():
|
|
28
|
+
raise RuntimeError(f"Binary not found: {path}")
|
|
29
|
+
return path
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
def main() -> None:
|
|
33
|
+
"""Main entry point - delegate to Rust binary."""
|
|
34
|
+
binary = get_binary_path()
|
|
35
|
+
os.chmod(binary, 0o755)
|
|
36
|
+
raise SystemExit(subprocess.call([str(binary)] + sys.argv[1:]))
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
if __name__ == "__main__":
|
|
40
|
+
main()
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
|
+
Name: codetwin
|
|
3
|
+
Version: 0.1.9
|
|
4
|
+
Summary: A code to diagram/documentation generator.
|
|
5
|
+
Author: Carlos Ferreyra
|
|
6
|
+
Classifier: Development Status :: 4 - Beta
|
|
7
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
8
|
+
Classifier: Programming Language :: Python :: 3
|
|
9
|
+
Requires-Python: >=3.8
|
|
10
|
+
Project-URL: Documentation, https://docs.rs/codetwin
|
|
11
|
+
Project-URL: Homepage, https://github.com/carlosferreyra/codetwin
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
codetwin/__init__.py,sha256=ZDURRmosntXy3gXW6fv0_O2srlIO4t85fu1bEwlKjnU,77
|
|
2
|
+
codetwin/__main__.py,sha256=MSmt_5Xg84uHqzTN38JwgseJK8rsJn_11A8WD99VtEo,61
|
|
3
|
+
codetwin/_bin/.gitkeep,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
|
+
codetwin/_bin/codetwin-aarch64-darwin,sha256=2pd4SuIiNzg6UMybFVb_-D3PQ7HgDRvqOnHHSha2YK4,4101696
|
|
5
|
+
codetwin/cli.py,sha256=0aCQkxgqPHXWDSFPSDes4WkOd_sSk4sZGgPMRkwjaPg,1078
|
|
6
|
+
codetwin-0.1.9.dist-info/WHEEL,sha256=jROcLULcdzropX2J55opKw4UHhPFREZax2XzS-Mvpxs,80
|
|
7
|
+
codetwin-0.1.9.dist-info/entry_points.txt,sha256=_FigQyCJIpFDOj5j6d4fq_n_oPY0STjPkrY7us2nd_Y,48
|
|
8
|
+
codetwin-0.1.9.dist-info/METADATA,sha256=yrPflzvNy8KZB7tbsLmH439yPs_qozNje2yxDd-4H2Y,412
|
|
9
|
+
codetwin-0.1.9.dist-info/RECORD,,
|