From 5119ce92cbd8e24bc4fa52c370084ec664c1009c Mon Sep 17 00:00:00 2001 From: Paul Fitzpatrick Date: Wed, 2 Aug 2023 21:29:43 +0100 Subject: [PATCH] add a version number to precompiled pyodide resources (#607) --- sandbox/pyodide/Makefile | 14 +++++++++++--- sandbox/pyodide/build_packages.sh | 0 2 files changed, 11 insertions(+), 3 deletions(-) mode change 100644 => 100755 sandbox/pyodide/build_packages.sh diff --git a/sandbox/pyodide/Makefile b/sandbox/pyodide/Makefile index 2adc18c5..c2802429 100644 --- a/sandbox/pyodide/Makefile +++ b/sandbox/pyodide/Makefile @@ -1,18 +1,26 @@ +# This number should be bumped up if making a non-additive change +# to python packages. +GRIST_PYODIDE_VERSION = 2 + default: echo "Welcome to the pyodide sandbox" echo "make fetch_packages # gets python packages prepared earlier" echo "make build_packages # build python packages from scratch" echo "make save_packages # upload python packages to fetch later" - echo "setup # get pyodide node package" + echo "make clean_packages # remove local cache of python packages" + echo "setup # get pyodide node package, and python packages" fetch_packages: - node ./packages.js https://s3.amazonaws.com/grist-pynbox/pyodide/packages/ _build/packages/ + node ./packages.js https://s3.amazonaws.com/grist-pynbox/pyodide/packages/v$(GRIST_PYODIDE_VERSION)/ _build/packages/ build_packages: ./build_packages.sh save_packages: - aws s3 sync _build/packages s3://grist-pynbox/pyodide/packages/ + aws s3 sync _build/packages s3://grist-pynbox/pyodide/packages/v$(GRIST_PYODIDE_VERSION) + +clean_packages: + rm -rf _build/packages setup: ./setup.sh diff --git a/sandbox/pyodide/build_packages.sh b/sandbox/pyodide/build_packages.sh old mode 100644 new mode 100755