Skip to content
This repository was archived by the owner on Feb 14, 2024. It is now read-only.
Closed
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
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,13 +22,16 @@
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

try:
# support jupyterlite-core 0.2.0
from jupyterlite_core.addons.federated_extensions import ENV_EXTENSIONS
except ImportError:
ENV_EXTENSIONS = None

JUPYTERLITE_XEUS_PYTHON = "@jupyterlite/xeus-python-kernel"


Expand Down Expand Up @@ -74,7 +77,8 @@ 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"""
# Install the jupyterlite-xeus-python ourselves
for pkg_json in self.env_extensions(ENV_EXTENSIONS):
env_extensions = self.labextensions_path or 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