diff --git a/extra/build_conda_packed.sh b/extra/build_conda_packed.sh index 71d318d3..d786d628 100755 --- a/extra/build_conda_packed.sh +++ b/extra/build_conda_packed.sh @@ -9,7 +9,7 @@ conda activate base || { echo 'failed: conda not installed'; exit 1; } conda install -y conda-pack conda remove -n "$ENV_NAME" -y --all -conda create -n "$ENV_NAME" -q --force -y "python=$PYTHON_VERSION" +conda create -n "$ENV_NAME" -q --force -y "python=$PYTHON_VERSION" "nodejs" conda-pack -n "$ENV_NAME" -f -o "$ENV_NAME.tar.gz" # unpack the new environment, that contains only python + pip @@ -31,6 +31,16 @@ $envdir/bin/python -m pip install --no-input --no-compile git+https://github.com $envdir/bin/python -m pip install --no-input --no-compile git+https://github.com/reflectometry/refl1d@webview $envdir/bin/python -m pip install --no-compile -r https://raw.githubusercontent.com/bumps/bumps/webview/webview-requirements +# build the client +cd $envdir/lib/python$PYTHON_VERSION/site-packages/bumps/webview/client +$envdir/bin/npm install +$envdir/bin/npm link + +cd $envdir/lib/python$PYTHON_VERSION/site-packages/refl1d/webview/client +$envdir/bin/npm link ../../../bumps/webview/client +$envdir/bin/npm install +$envdir/bin/npm run build + version=$($envdir/bin/python -c "import refl1d; print(refl1d.__version__)") mv "$tmpdir/$DIRNAME" "$tmpdir/$DIRNAME-$version" diff --git a/refl1d/webview/client/package.json b/refl1d/webview/client/package.json index 316822b4..25ad44f0 100644 --- a/refl1d/webview/client/package.json +++ b/refl1d/webview/client/package.json @@ -15,13 +15,13 @@ "json-difference": "^1.8.2", "mpld3": "^0.5.8", "plotly.js": "^2.29.0", - "pyodide": "^0.23.2", "socket.io-client": "^4.5.2", "uuid": "^9.0.0", "vue": "^3.2.38", "vue-json-viewer": "^3.0.4" }, "devDependencies": { + "pyodide": "^0.23.2", "@types/plotly.js": "^2.12.5", "@types/uuid": "^8.3.4", "@vitejs/plugin-vue": "^5.0.4",