patch: monkey patch rebuild script (#2)

pull/7775/head
Luigi 5 months ago committed by GitHub
parent 3cc10765c5
commit 102e13096b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -19,10 +19,27 @@ echo " * upgrade pip";
pip install --upgrade pip;
echo " * installing python deps";
pip install -e ".[dev,docs,test]"
# Install build requirements manually to allow --no-build-isolation
pip install "hatchling>=1.11" "jupyterlab>=4.5.0rc0,<4.6" "hatch-jupyter-builder>=0.5" "editables"
# Disable build hooks to prevent premature frontend build
export HATCH_BUILD_HOOKS_ENABLE=false
export HATCH_BUILD_NO_HOOKS=true
export JUPYTER_PACKAGING_SKIP_NPM=1
pip install --no-build-isolation -e ".[dev,docs,test]"
unset HATCH_BUILD_HOOKS_ENABLE
unset HATCH_BUILD_NO_HOOKS
unset JUPYTER_PACKAGING_SKIP_NPM
echo " * build node";
./.venv/bin/jlpm install
# Patch lib0 types to fix Uint8Array generic error
echo " * patching lib0 types";
find . -type f -name "encoding.d.ts" -path "*/lib0/*" -exec perl -pi -e 's/Uint8Array<[^>]+>/Uint8Array/g' {} +
./.venv/bin/jlpm build;
echo " * run node develop";

Loading…
Cancel
Save