From cdb5e60adea898cb2a6c75027a7d3da3389e435b Mon Sep 17 00:00:00 2001 From: Amin Rezaei Date: Tue, 14 Feb 2023 12:25:56 +0330 Subject: [PATCH] features: Apple M1/M2 binaries! + upgrade crcset to use WASM fallback --- pyproject.toml | 4 ++-- requirements.txt | 2 +- rift/runtime/riftlib.py | 13 +++++++++++-- setup.py | 2 +- 4 files changed, 15 insertions(+), 6 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 4956a4d..75d1db9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "rift-framework" -version = "0.9.13" +version = "0.9.14" description = "The magical Python -> TON Portal" authors = ["Amin Rezaei "] license = "MIT" @@ -20,7 +20,7 @@ appdirs = "~1.4.4" colorful = "~0.5.4" tqdm = "^4.64.1" setuptools = "^65.6.3" -rift-tonlib = "^0.0.2" +rift-tonlib = "^0.0.3" cryptography = "^39.0.0" pynacl = "^1.5.0" rich = "^13.3.1" diff --git a/requirements.txt b/requirements.txt index e3dd148..ee4b7d1 100644 --- a/requirements.txt +++ b/requirements.txt @@ -20,7 +20,7 @@ pynacl==1.5.0 ; python_version >= "3.10" and python_version < "4.0" pyyaml==6.0 ; python_version >= "3.10" and python_version < "4.0" requests==2.28.2 ; python_version >= "3.10" and python_version < "4" rich==13.3.1 ; python_version >= "3.10" and python_version < "4.0" -rift-tonlib==0.0.2 ; python_version >= "3.10" and python_version < "4.0" +rift-tonlib==0.0.3 ; python_version >= "3.10" and python_version < "4.0" setuptools==65.6.3 ; python_version >= "3.10" and python_version < "4.0" tomlkit==0.11.4 ; python_version >= "3.10" and python_version < "4.0" tqdm==4.64.1 ; python_version >= "3.10" and python_version < "4.0" diff --git a/rift/runtime/riftlib.py b/rift/runtime/riftlib.py index 3a09359..e8c4abd 100644 --- a/rift/runtime/riftlib.py +++ b/rift/runtime/riftlib.py @@ -10,10 +10,11 @@ class RiftLibSetup: - version = 2 + version = 3 urls = { "windows": "https://github.com/AminRezaei0x443/ton/releases/download/v0.1.5/rift-lib-win64.dll", "darwin": "https://github.com/AminRezaei0x443/ton/releases/download/v0.1.5/rift-lib-macOS.dylib", + "darwin-slc": "https://github.com/AminRezaei0x443/ton/releases/download/v0.1.5/rift-lib-macOS-silicon.dylib", "linux-u18": "https://github.com/AminRezaei0x443/ton/releases/download/v0.1.5/rift-lib-ubuntu-18.04.so", "linux-u20": "https://github.com/AminRezaei0x443/ton/releases/download/v0.1.5/rift-lib-ubuntu-20.04.so", "linux-u22": "https://github.com/AminRezaei0x443/ton/releases/download/v0.1.5/rift-lib-ubuntu-22.04.so", @@ -54,8 +55,16 @@ def _ubuntu_version(cls) -> int: @classmethod def determine_lib(cls) -> str: s = platform.uname().system.lower() - if s == "windows" or s == "darwin": + if s == "windows": return cls.urls[s] + if s == "darwin": + proc = platform.processor() + if proc == "i386": + return cls.urls[s] + elif proc == "arm": + return cls.urls[f"{s}-slc"] + else: + raise RuntimeError(f"Unknown processor: {proc}") uv = cls._ubuntu_version() if uv == -1: raise RuntimeError("Unsupported os") diff --git a/setup.py b/setup.py index 560597a..ec85a31 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ setup( name="rift-framework", - version="0.9.13", + version="0.9.14", description="A magical Python3 -> TON portal", license="MIT", packages=find_packages(exclude=["test"]),