mirror of
https://github.com/gristlabs/grist-core.git
synced 2024-10-27 20:44:07 +00:00
Upgrade to Pyodide 0.23.4 (with Python 3.11) and compile dependencies (#603)
* Build packages with latest pyodide, compile wheels to use pyc files, output package_filenames.json
This commit is contained in:
parent
4cfa033078
commit
d72f177be0
@ -17,14 +17,16 @@ echo "###############################################################"
|
|||||||
echo "## Prepare python packages"
|
echo "## Prepare python packages"
|
||||||
|
|
||||||
cd _build/pyodide
|
cd _build/pyodide
|
||||||
|
git checkout 0.23.4 || (git fetch && git checkout 0.23.4)
|
||||||
./run_docker make
|
./run_docker make
|
||||||
cp ../../../requirements3.txt .
|
cp ../../../requirements3.txt .
|
||||||
./run_docker pyodide build -r requirements3.txt --output-lockfile result.txt
|
./run_docker "source emsdk/emsdk/emsdk_env.sh && pyodide build -r requirements3.txt --outdir grist-packages"
|
||||||
cat result.txt
|
./run_docker pyodide py-compile grist-packages
|
||||||
cd ../..
|
cd ../..
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "###############################################################"
|
echo "###############################################################"
|
||||||
echo "## Copy out python packages"
|
echo "## Copy out python packages"
|
||||||
|
|
||||||
node ./packages.js _build/pyodide/dist/ _build/packages/
|
rm -rf _build/packages/
|
||||||
|
node ./packages.js _build/pyodide/grist-packages/ _build/packages/
|
||||||
|
21
sandbox/pyodide/package_filenames.json
Normal file
21
sandbox/pyodide/package_filenames.json
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
[
|
||||||
|
"astroid-2.14.2-cp311-none-any.whl",
|
||||||
|
"asttokens-2.2.1-cp311-none-any.whl",
|
||||||
|
"chardet-4.0.0-cp311-none-any.whl",
|
||||||
|
"et_xmlfile-1.0.1-cp311-none-any.whl",
|
||||||
|
"executing-1.1.1-cp311-none-any.whl",
|
||||||
|
"friendly_traceback-0.7.48-cp311-none-any.whl",
|
||||||
|
"iso8601-0.1.12-cp311-none-any.whl",
|
||||||
|
"lazy_object_proxy-1.6.0-cp311-cp311-emscripten_3_1_32_wasm32.whl",
|
||||||
|
"openpyxl-3.0.10-cp311-none-any.whl",
|
||||||
|
"phonenumberslite-8.12.57-cp311-none-any.whl",
|
||||||
|
"pure_eval-0.2.2-cp311-none-any.whl",
|
||||||
|
"python_dateutil-2.8.2-cp311-none-any.whl",
|
||||||
|
"roman-3.3-cp311-none-any.whl",
|
||||||
|
"six-1.16.0-cp311-none-any.whl",
|
||||||
|
"sortedcontainers-2.4.0-cp311-none-any.whl",
|
||||||
|
"stack_data-0.5.1-cp311-none-any.whl",
|
||||||
|
"typing_extensions-4.4.0-cp311-none-any.whl",
|
||||||
|
"unittest_xml_reporting-2.0.0-cp311-none-any.whl",
|
||||||
|
"wrapt-1.15.0-cp311-none-any.whl"
|
||||||
|
]
|
@ -61,6 +61,8 @@ async function findOnDisk(src, dest) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
libs = await listLibs(dest);
|
libs = await listLibs(dest);
|
||||||
|
fs.writeFileSync(path.join(__dirname, `package_filenames.json`),
|
||||||
|
JSON.stringify(libs.available.map(lib => lib.fileName), null, 2));
|
||||||
console.log(`Cached`, {libs: libs.available.map(lib => lib.name)});
|
console.log(`Cached`, {libs: libs.available.map(lib => lib.name)});
|
||||||
console.log(`Missing`, {libs: libs.misses.map(lib => lib.name)});
|
console.log(`Missing`, {libs: libs.misses.map(lib => lib.name)});
|
||||||
}
|
}
|
||||||
|
@ -10,6 +10,6 @@ if [[ ! -e _build/worker ]]; then
|
|||||||
mkdir -p _build/worker
|
mkdir -p _build/worker
|
||||||
cd _build/worker
|
cd _build/worker
|
||||||
yarn init --yes
|
yarn init --yes
|
||||||
yarn add pyodide@0.22.1
|
yarn add pyodide@0.23.4
|
||||||
cd ../..
|
cd ../..
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user