Skip to content
This repository was archived by the owner on Feb 14, 2024. It is now read-only.
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
2 changes: 1 addition & 1 deletion docs/build-environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ dependencies:
- pydata-sphinx-theme
- yarn
- jupyterlab >=3.5.3,<3.6
- jupyterlite-core >=0.1.0,<0.2.0
- jupyterlite-core >=0.1.0,<0.3.0
- jupyterlite-sphinx >=0.9.1
- empack >=3.1.0
- pip:
Expand Down
14 changes: 9 additions & 5 deletions jupyterlite_xeus_python/env_build_addon.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,7 @@
UTF8,
FEDERATED_EXTENSIONS,
)
from jupyterlite_core.addons.federated_extensions import (
FederatedExtensionAddon,
ENV_EXTENSIONS,
)
from jupyterlite_core.addons.federated_extensions import FederatedExtensionAddon

from .build import XEUS_PYTHON_VERSION, build_and_pack_emscripten_env

Expand Down Expand Up @@ -73,8 +70,15 @@ def __init__(self, *args, **kwargs):

def post_build(self, manager):
"""yield a doit task to create the emscripten-32 env and grab anything we need from it"""
try:
# JupyterLite 0.1.x
from jupyterlite_core.addons.federated_extensions import ENV_EXTENSIONS as env_extensions
except ImportError:
# JupyterLite 0.2.x
env_extensions = self.labextensions_path

# Install the jupyterlite-xeus-python ourselves
for pkg_json in self.env_extensions(ENV_EXTENSIONS):
for pkg_json in self.env_extensions(env_extensions):
pkg_data = json.loads(pkg_json.read_text(**UTF8))
if pkg_data.get("name") == JUPYTERLITE_XEUS_PYTHON:
yield from self.safe_copy_extension(pkg_json)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
packages=setuptools.find_packages(exclude=["tests"]),
install_requires=[
"traitlets",
"jupyterlite-core>=0.1,<0.2",
"jupyterlite-core>=0.1,<0.3",
"requests",
"empack>=3.1,<4",
"typer",
Expand Down