Skip to content

Commit

Permalink
Load bokeh wheels from central location in CDN (#5638)
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr authored Oct 15, 2023
1 parent 22acd05 commit 321a10e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions panel/io/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
from .markdown import build_single_handler_application
from .mime_render import find_imports
from .resources import (
BASE_TEMPLATE, CDN_DIST, DIST_DIR, INDEX_TEMPLATE, Resources,
BASE_TEMPLATE, CDN_DIST, CDN_ROOT, DIST_DIR, INDEX_TEMPLATE, Resources,
_env as _pn_env, bundle_resources, loading_css, set_resource_mode,
)
from .state import set_curdoc, state
Expand All @@ -47,7 +47,7 @@
PANEL_LOCAL_WHL = DIST_DIR / 'wheels' / f'panel-{__version__.replace("-dirty", "")}-py3-none-any.whl'
BOKEH_LOCAL_WHL = DIST_DIR / 'wheels' / f'bokeh-{BOKEH_VERSION}-py3-none-any.whl'
PANEL_CDN_WHL = f'{CDN_DIST}wheels/panel-{PY_VERSION}-py3-none-any.whl'
BOKEH_CDN_WHL = f'{CDN_DIST}wheels/bokeh-{BOKEH_VERSION}-py3-none-any.whl'
BOKEH_CDN_WHL = f'{CDN_ROOT}wheels/bokeh-{BOKEH_VERSION}-py3-none-any.whl'
PYODIDE_URL = f'https://cdn.jsdelivr.net/pyodide/{PYODIDE_VERSION}/full/pyodide.js'
PYODIDE_PYC_URL = f'https://cdn.jsdelivr.net/pyodide/{PYODIDE_VERSION}/pyc/pyodide.js'
PYSCRIPT_CSS = f'<link rel="stylesheet" href="https://pyscript.net/releases/{PYSCRIPT_VERSION}/pyscript.css" />'
Expand Down
3 changes: 2 additions & 1 deletion panel/io/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ def conffilter(value):
BASIC_LOGIN_TEMPLATE = _env.get_template('basic_login.html')
DEFAULT_TITLE = "Panel Application"
JS_RESOURCES = _env.get_template('js_resources.html')
CDN_URL = f"https://cdn.holoviz.org/panel/{JS_VERSION}/"
CDN_ROOT = "https://cdn.holoviz.org/panel/"
CDN_URL = f"{CDN_ROOT}{JS_VERSION}/"
CDN_DIST = f"{CDN_URL}dist/"
DOC_DIST = "https://panel.holoviz.org/_static/"
LOCAL_DIST = "static/extensions/panel/"
Expand Down
4 changes: 3 additions & 1 deletion scripts/cdn_upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,7 @@

sp = subprocess.Popen(['aws', 's3', 'sync', 'panel/dist', f's3://cdn.holoviz.org/panel/{js_version}/dist/'])
sp.wait()
sp2 = subprocess.Popen(['aws', 's3', 'cp', 'panel/package.json', f's3://cdn.holoviz.org/panel/{js_version}/package.json'])
sp2 = subprocess.Popen(['aws', 's3', 'sync', 'panel/dist/wheels/bokeh*', f's3://cdn.holoviz.org/panel/wheels/'])
sp2.wait()
sp3 = subprocess.Popen(['aws', 's3', 'cp', 'panel/package.json', f's3://cdn.holoviz.org/panel/{js_version}/package.json'])
sp3.wait()

0 comments on commit 321a10e

Please sign in to comment.