belluzj / fantasque-sans

A font family with a great monospaced variant for programmers.
http://openfontlibrary.org/en/font/fantasque-sans-mono
SIL Open Font License 1.1
6.97k stars 154 forks source link

Build: fix range error for missing module 'past' #156

Open ashang opened 1 year ago

ashang commented 1 year ago

On systems without future, there would issues with missing past.

    from past.builtins import xrange
ModuleNotFoundError: No module named 'past'

Installing future like pip install future can help, but it bothers.

Changing xrange to range can be OK since python3 has no xrange anymore, while both 2 and 3 can have range.

The performance impact with python2 should be minor.

Tested OK on latest Debian bullseye/bookworm, Ubuntu jammy, and Archlinux, with python2 linked to 2.7.18, or 2.7.3, while python linked to 3.10.8, 3.10.6, or 3.9.2.

ashang commented 1 year ago

Possibly this can fix belluzj/fantasque-sans#100.

This relates to and works with both belluzj/fantasque-sans#142 and belluzj/fantasque-sans#147.