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 ADDED
@@ -0,0 +1,3 @@
1
+ """CodeTwin - Universal code to diagram generator."""
2
+
3
+ __version__ = "0.1.0"
codetwin/__main__.py ADDED
@@ -0,0 +1,4 @@
1
+ from .cli import main
2
+
3
+ if __name__ == "__main__":
4
+ main()
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,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: uv 0.10.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,3 @@
1
+ [console_scripts]
2
+ codetwin = codetwin.cli:main
3
+