pybble icon indicating copy to clipboard operation
pybble copied to clipboard

Python3, bitrot, and Transcrypt

Open clach04 opened this issue 1 year ago • 0 comments

Problem background

Transcrypt requires Python3, this is not clear from pybble readme but it is from the Transcrypt readme.

Today (2022-08-13) Transcrypt claims to need version Python 3.9 (although Python 3.7 does appear to work?).

The Python 3 version that was available at the time of the Pebble SDK release was Python 3.5, later versions of Transcrypt make (extensive) use of f-strings, which are a Python 3.6 feature. This means that for machines that are using stock Python (rather than building Python from source), older version(s) of Transcrypt (and it's dependency mypy) need to be older releases. The current install instructions/setup.py will fail to create a useful environment with Python 3.5 (either fail to install or get syntax errors at runtime).

Solution(s)

Install older versions that are known to work, for example, issue:

python3 -m pip install -r python35_requirements.txt

Where:

$ cat python35_requirements.txt
click==7.1.2
envoy==0.0.3
pyperclip==1.8.2
mypy==0.971
transcrypt==3.6.40

NOTE known to work (on real hardware, with android phone):

  • Transcrypt 3.5.213 - 2016-08-19 about the time of this project
  • Transcrypt 3.5.217 released 2016-08-26

clach04 avatar Aug 14 '22 01:08 clach04