Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/trame_vtklocal/module/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from pathlib import Path
from trame_vtklocal import __version__
from trame_vtklocal.module.wasm import register_wasm
from trame_vtklocal.module.protocol import ObjectManagerHelper

Expand All @@ -12,9 +13,9 @@

serve_path = str(Path(__file__).with_name("serve").resolve())

serve = {"__trame_vtklocal": serve_path}
scripts = ["__trame_vtklocal/js/trame_vtklocal.umd.js"]
styles = ["__trame_vtklocal/js/trame_vtklocal.css"]
serve = {f"__trame_vtklocal_{__version__}": serve_path}
scripts = [f"__trame_vtklocal_{__version__}/js/trame_vtklocal.umd.js"]
styles = [f"__trame_vtklocal_{__version__}/js/trame_vtklocal.css"]
vue_use = ["trame_vtklocal"]

# -----------------------------------------------------------------------------
Expand Down
4 changes: 3 additions & 1 deletion src/trame_vtklocal/module/wasm.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
import tarfile
from packaging.version import parse

from trame_vtklocal import __version__


def run_async(coroutine):
try:
Expand Down Expand Up @@ -69,7 +71,7 @@ def register_wasm(serve_path, **kwargs):
"""
version, wasm_url = get_wasm_info()
wasm_base_name = kwargs.get("wasm_base_name", "vtk")
BASE_URL = f"__trame_vtklocal/wasm/{version}"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file don't need to be changed. The wasm bundle is already versioned by itself on VTK.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Never mind, you are correct.

BASE_URL = f"__trame_vtklocal_{__version__}/wasm/{version}"
dest_directory = Path(serve_path) / "wasm" / version

# get wasm directory from kwargs or environment variable
Expand Down
Loading