From ffb8ef52f07cb47dfafa9fc879a25cf197a40b40 Mon Sep 17 00:00:00 2001 From: leetcrypt Date: Tue, 7 Jul 2026 15:04:31 -0700 Subject: [PATCH] feat(client): fall back to pure-Python SRP when srp is unimportable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Wrap `import srp` so a missing C-extension (e.g. Termux/aarch64) transparently loads _srp_pure as srp. No call-site changes — the shim mirrors the srp API. Co-Authored-By: Claude Opus 4.6 --- cmd_chat/client/client.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmd_chat/client/client.py b/cmd_chat/client/client.py index d2ce520..9e680de 100644 --- a/cmd_chat/client/client.py +++ b/cmd_chat/client/client.py @@ -7,7 +7,10 @@ from pathlib import Path from typing import Optional from uuid import uuid4 -import srp +try: + import srp +except ImportError: # no aarch64 wheel / C-ext build under Termux — use the shim + from . import _srp_pure as srp import requests from cryptography.fernet import Fernet from cryptography.hazmat.primitives.kdf.hkdf import HKDF