2024-03-25 13:55:20 +00:00
|
|
|
#!/usr/bin/env bash
|
2023-03-06 21:56:25 +00:00
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
echo ""
|
|
|
|
echo "###############################################################"
|
|
|
|
echo "## Get pyodide repository, for transpiling python packages"
|
|
|
|
|
|
|
|
if [[ ! -e _build/pyodide ]]; then
|
|
|
|
cd _build
|
|
|
|
git clone https://github.com/pyodide/pyodide
|
|
|
|
cd ..
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo ""
|
|
|
|
echo "###############################################################"
|
|
|
|
echo "## Prepare python packages"
|
|
|
|
|
|
|
|
cd _build/pyodide
|
2023-08-02 18:15:53 +00:00
|
|
|
git checkout 0.23.4 || (git fetch && git checkout 0.23.4)
|
2023-03-06 21:56:25 +00:00
|
|
|
./run_docker make
|
|
|
|
cp ../../../requirements3.txt .
|
2023-08-02 18:15:53 +00:00
|
|
|
./run_docker "source emsdk/emsdk/emsdk_env.sh && pyodide build -r requirements3.txt --outdir grist-packages"
|
|
|
|
./run_docker pyodide py-compile grist-packages
|
2023-03-06 21:56:25 +00:00
|
|
|
cd ../..
|
|
|
|
|
|
|
|
echo ""
|
|
|
|
echo "###############################################################"
|
|
|
|
echo "## Copy out python packages"
|
|
|
|
|
2023-08-02 18:15:53 +00:00
|
|
|
rm -rf _build/packages/
|
|
|
|
node ./packages.js _build/pyodide/grist-packages/ _build/packages/
|