Skip to content

Commit 9ae50d3

Browse files
authored
Merge pull request #1 from emscripten-forge/newver
use new version
2 parents e779d99 + 9309c77 commit 9ae50d3

File tree

5 files changed

+21
-15
lines changed

5 files changed

+21
-15
lines changed

.github/workflows/main.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,25 +29,25 @@ jobs:
2929
- name: Install mamba
3030
uses: mamba-org/provision-with-micromamba@main
3131
with:
32-
environment-file: env.yaml
33-
environment-name: pyjs-wasm
32+
environment-file: build-env.yaml
33+
environment-name: pyjs-build-env
3434
micromamba-version: "0.23.2"
3535

3636

3737
- name: build page
3838
run: |
39-
micromamba activate pyjs-wasm
39+
micromamba activate pyjs-build-env
4040
4141
4242
mkdir build
4343
pushd build
4444
45-
micromamba create -n pyjs-browser-env \
45+
micromamba create -n pyjs-web-env \
4646
--platform=emscripten-32 \
4747
-c https://repo.mamba.pm/emscripten-forge \
4848
-c https://repo.mamba.pm/conda-forge \
4949
--yes \
50-
"pyjs==0.8.0" numpy
50+
-f $GITHUB_WORKSPACE/web-env.yaml
5151
5252
5353
# donload empack config
@@ -57,7 +57,7 @@ jobs:
5757
5858
5959
# pack the environment in a js/data file
60-
empack pack env --env-prefix $MAMBA_ROOT_PREFIX/envs/pyjs-browser-env --outname python_data --config empack_config.yaml
60+
empack pack env --env-prefix $MAMBA_ROOT_PREFIX/envs/pyjs-web-env --outname python_data --config empack_config.yaml
6161
6262
6363
# copy relevant files from build to page
@@ -66,7 +66,7 @@ jobs:
6666
6767
6868
# copy relevant files from env to page
69-
cp $MAMBA_ROOT_PREFIX/envs/pyjs-browser-env/lib_js/pyjs/pyjs_runtime_browser* ../page
69+
cp $MAMBA_ROOT_PREFIX/envs/pyjs-web-env/lib_js/pyjs/pyjs_runtime_browser* ../page
7070
7171
- name: Deploy
7272
uses: peaceiris/actions-gh-pages@v3

env.yaml renamed to build-env.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: pyjs-wasm
1+
name: pyjs-build-env
22
channels:
33
- conda-forge
44
dependencies:

build_page.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
set -e
33

44
# install wasm env
5-
rm -rf $MAMBA_ROOT_PREFIX/envs/pyjs-build-wasm
6-
micromamba create -n pyjs-build-wasm \
5+
rm -rf $MAMBA_ROOT_PREFIX/envs/pyjs-web-env
6+
micromamba create -n pyjs-web-env \
77
--platform=emscripten-32 \
88
-c https://repo.mamba.pm/emscripten-forge \
99
-c https://repo.mamba.pm/conda-forge \
1010
--yes \
11-
"pyjs==0.8.0" numpy
11+
-f web-env.yaml
1212

1313
# create build/work dir
1414
mkdir -p build
@@ -21,15 +21,15 @@ wget -O $EMPACK_CONFIG https://raw.githubusercontent.com/emscripten-forge/recipe
2121

2222

2323
# pack the environment in a js/data file
24-
empack pack env --env-prefix $MAMBA_ROOT_PREFIX/envs/pyjs-build-wasm --outname python_data --config empack_config.yaml
24+
empack pack env --env-prefix $MAMBA_ROOT_PREFIX/envs/pyjs-web-env --outname python_data --config empack_config.yaml
2525

2626

2727
# copy relevant files from build to page
2828
cp python_data.js ../page
2929
cp python_data.data ../page
3030

3131
# copy relevant files from env to page
32-
cp $MAMBA_ROOT_PREFIX/envs/pyjs-build-wasm/lib_js/pyjs/pyjs_runtime_browser* ../page
32+
cp $MAMBA_ROOT_PREFIX/envs/pyjs-web-env/lib_js/pyjs/pyjs_runtime_browser* ../page
3333

3434
cd ../page
3535

page/script.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,8 @@ var Module = {};
9494
pyjs.setStatus = setStatus
9595
addToOutput("Download data ...")
9696
var promise_core = await import('./python_data.js')
97-
pyjs.init()
97+
await pyjs.init()
9898

99-
var deps = await pyjs._wait_run_dependencies()
10099
addToOutput("...done")
101100
interpreter = new pyjs.Interpreter()
102101
main_scope = pyjs.main_scope()

web-env.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
name: pyjs-web-env
2+
channels:
3+
- https://repo.mamba.pm/emscripten-forge
4+
- conda-forge
5+
dependencies:
6+
- pyjs == 0.9.0
7+
- numpy

0 commit comments

Comments
 (0)