memorph 0.1.0__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.
memorph/__main__.py
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import os
|
|
2
|
+
import platform
|
|
3
|
+
import sys
|
|
4
|
+
from importlib.resources import files
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
def main() -> None:
|
|
8
|
+
system = platform.system()
|
|
9
|
+
machine = platform.machine()
|
|
10
|
+
|
|
11
|
+
mapping = {
|
|
12
|
+
("Darwin", "arm64"): "memorph_bin_darwin_arm64",
|
|
13
|
+
("Darwin", "x86_64"): "memorph_bin_darwin_x64",
|
|
14
|
+
("Linux", "x86_64"): "memorph_bin_linux_x64_gnu",
|
|
15
|
+
("Linux", "aarch64"): "memorph_bin_linux_arm64_gnu",
|
|
16
|
+
("Windows", "AMD64"): "memorph_bin_win32_x64_msvc",
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
module_name = mapping.get((system, machine))
|
|
20
|
+
if module_name is None:
|
|
21
|
+
print(f"Unsupported platform: {system} {machine}", file=sys.stderr)
|
|
22
|
+
sys.exit(1)
|
|
23
|
+
|
|
24
|
+
try:
|
|
25
|
+
binary_name = "memorph.exe" if system == "Windows" else "memorph"
|
|
26
|
+
binary_path = files(module_name) / "bin" / binary_name
|
|
27
|
+
except Exception as e:
|
|
28
|
+
print(f"Failed to locate memorph binary: {e}", file=sys.stderr)
|
|
29
|
+
sys.exit(1)
|
|
30
|
+
|
|
31
|
+
# execv replaces the current process, avoiding extra Python overhead
|
|
32
|
+
os.execv(str(binary_path), [str(binary_path)] + sys.argv[1:])
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
if __name__ == "__main__":
|
|
36
|
+
main()
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: memorph
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: memorph main package; dispatches to a prebuilt platform binary
|
|
5
|
+
Requires-Python: >=3.10
|
|
6
|
+
Description-Content-Type: text/markdown
|
|
7
|
+
Requires-Dist: memorph-bin-darwin-arm64==0.1.0; platform_system == "Darwin" and platform_machine == "arm64"
|
|
8
|
+
Requires-Dist: memorph-bin-darwin-x64==0.1.0; platform_system == "Darwin" and platform_machine == "x86_64"
|
|
9
|
+
Requires-Dist: memorph-bin-linux-x64-gnu==0.1.0; platform_system == "Linux" and platform_machine == "x86_64"
|
|
10
|
+
Requires-Dist: memorph-bin-linux-arm64-gnu==0.1.0; platform_system == "Linux" and platform_machine == "aarch64"
|
|
11
|
+
Requires-Dist: memorph-bin-win32-x64-msvc==0.1.0; platform_system == "Windows" and platform_machine == "AMD64"
|
|
12
|
+
|
|
13
|
+
# memorph
|
|
14
|
+
|
|
15
|
+
This is the main PyPI package for [memorph](https://github.com/whillhill/memorph).
|
|
16
|
+
|
|
17
|
+
It downloads the correct prebuilt binary for your platform via conditional dependencies.
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
memorph/__main__.py,sha256=ZSDKMil5DU9dxuozuLayYuQ7o35nxpss2oizs2k4hi0,1096
|
|
2
|
+
memorph-0.1.0.dist-info/METADATA,sha256=iqpPTaIx-Azgyq_KuQKYLCTI1_mvQlZHWrqsOaWKdpQ,919
|
|
3
|
+
memorph-0.1.0.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
|
|
4
|
+
memorph-0.1.0.dist-info/entry_points.txt,sha256=hEAs3G6A4lSDhfFSu5O799_jpWjwWctqVynVApG9yIA,50
|
|
5
|
+
memorph-0.1.0.dist-info/top_level.txt,sha256=yXfbm2n33vTpnofbUXafMls9V9jfA1udjo2GboBRl4w,8
|
|
6
|
+
memorph-0.1.0.dist-info/RECORD,,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
memorph
|