Pin build process to Python 3.7

After a package update, transcrypt produces incomplete JS:
__target__/OOMAnalyser.js (147:15)
145:       }
146:       if (cols_to_strip) {
147:         var line = ;
                        ^
148:       }
149:       if (line.startswith ('kernel:')) {

instead of
 146       if (cols_to_strip) {
 147         var line = __getitem__ ((function () {
 148           var __accu0__ = line;
 149           return __call__ (__accu0__.py_split, __accu0__, '     ', cols_to_strip);
 150         }) (), __neg__ (1));
 151       }
 152       if (line.startswith ('kernel:')) {

A temporary pinning of Transcrypt to Python 3.7 solves this issue.
This commit is contained in:
Carsten Grohmann 2020-12-08 10:50:40 +01:00
parent 5945fb2d37
commit 1292d4f1e2
3 changed files with 13 additions and 3 deletions

View File

@ -33,6 +33,16 @@ tasks:
git clone https://aur.archlinux.org/rollup.git
cd rollup
makepkg --noconfirm -si
- setup_py37: |
cd OOMAnalyser
git clone https://aur.archlinux.org/python37.git
cd python37
makepkg --noconfirm -si --skippgpcheck
cd ..
# create virtualenv for Python 3.7
make venv-clean
virtualenv3 -p /usr/bin/python3.7 env
env/bin/pip install -Ur requirements.txt
- build: |
cd OOMAnalyser
make build

View File

@ -10,7 +10,7 @@
SHELL = /bin/sh
BASE_DIR = .
PYTHON3_BIN = python3
PYTHON3_BIN = /usr/bin/python3.7
ROLLUP_BIN = rollup
ROLLUP_OPTS = --format=umd --name OOMAnalyser --file=OOMAnalyser.js
TRANSCRYPT_BIN = transcrypt
@ -47,7 +47,7 @@ distclean: clean venv-clean
@(RM) --force .git .gitignore
$(VIRTUAL_ENV_DIR)/bin/activate: requirements.txt
test -d $(VIRTUAL_ENV_DIR) || virtualenv $(VIRTUAL_ENV_DIR)
test -d $(VIRTUAL_ENV_DIR) || virtualenv -p $(PYTHON3_BIN) $(VIRTUAL_ENV_DIR)
. $(VIRTUAL_ENV_DIR)/bin/activate
$(VIRTUAL_ENV_DIR)/bin/pip install -Ur requirements.txt
touch $(VIRTUAL_ENV_DIR)/bin/activate

View File

@ -34,7 +34,7 @@ without an Internet connection.
### Requirements
* [Python](http://www.python.org) 3.6 or later
* [Python](http://www.python.org) 3.7
* [Transcrypt](https://www.transcrypt.org/) 3.7
* [Rollup](https://rollupjs.org/)