()
| 946 | |
| 947 | # ------------------ Termux install helpers ------------------ |
| 948 | def termux_prefix() -> Optional[Path]: |
| 949 | p = os.environ.get("PREFIX") |
| 950 | if p: |
| 951 | return Path(p) |
| 952 | guess = Path("/data/data/com.termux/files/usr") |
| 953 | return guess if guess.exists() else None |
| 954 | |
| 955 | |
| 956 | # ------------------ Prompts (localized) ------------------ |