From 1292d4f1e29bc729dd0ec3e61bc42771a25247a6 Mon Sep 17 00:00:00 2001 From: Carsten Grohmann Date: Tue, 8 Dec 2020 10:50:40 +0100 Subject: [PATCH] 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. --- .build.yml | 10 ++++++++++ Makefile | 4 ++-- README.md | 2 +- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/.build.yml b/.build.yml index 5977955..51041fa 100644 --- a/.build.yml +++ b/.build.yml @@ -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 diff --git a/Makefile b/Makefile index d6b9746..f8d9ceb 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/README.md b/README.md index e343f43..594179d 100644 --- a/README.md +++ b/README.md @@ -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/)