Skip to content

Commit

Permalink
Fix jupytlerlab version
Browse files Browse the repository at this point in the history
Signed-off-by: Jay Wang <jay@zijie.wang>
  • Loading branch information
xiaohk committed Jun 18, 2023
1 parent e053852 commit c202433
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,6 @@ jobs:
sudo rm -rf $(which node)
sudo rm -rf $(which node)
pip install myextension.tar.gz
pip install jupyterlab
pip install jupyterlab<=3.6.4
python -m jupyterlab.browser_check --no-chrome-test
jupyter labextension list 2>&1 | grep -ie "jupyterlab-stickyland.*OK"
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["jupyter_packaging~=0.10,<2", "jupyterlab~=3.1"]
requires = ["jupyter_packaging~=0.10,<2", "jupyterlab<=3.6.4"]
build-backend = "jupyter_packaging.build_api"

[tool.jupyter-packaging.options]
Expand Down
33 changes: 18 additions & 15 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,19 @@
# The name of the project
name = "jupyterlab_stickyland"

lab_path = (HERE / name.replace("-", "_") / "labextension")
lab_path = HERE / name.replace("-", "_") / "labextension"

# Representative files that should exist after a successful build
ensured_targets = [
str(lab_path / "package.json"),
str(lab_path / "static/style.js")
]
ensured_targets = [str(lab_path / "package.json"), str(lab_path / "static/style.js")]

labext_name = "jupyterlab-stickyland"

data_files_spec = [
("share/jupyter/labextensions/%s" % labext_name, str(lab_path.relative_to(HERE)), "**"),
(
"share/jupyter/labextensions/%s" % labext_name,
str(lab_path.relative_to(HERE)),
"**",
),
("share/jupyter/labextensions/%s" % labext_name, str("."), "install.json"),
]

Expand All @@ -36,7 +37,7 @@
.replace("-alpha.", "a")
.replace("-beta.", "b")
.replace("-rc.", "rc")
)
)

setup_args = dict(
name=name,
Expand All @@ -50,7 +51,7 @@
long_description=long_description,
long_description_content_type="text/markdown",
packages=setuptools.find_packages(),
install_requires=[],
install_requires=["jupyterlab<=3.6.4"],
zip_safe=False,
include_package_data=True,
python_requires=">=3.6",
Expand All @@ -73,20 +74,22 @@
)

try:
from jupyter_packaging import (
wrap_installers,
npm_builder,
get_data_files
)
from jupyter_packaging import wrap_installers, npm_builder, get_data_files

post_develop = npm_builder(
build_cmd="install:extension", source_dir="src", build_dir=lab_path
)
setup_args["cmdclass"] = wrap_installers(post_develop=post_develop, ensured_targets=ensured_targets)
setup_args["cmdclass"] = wrap_installers(
post_develop=post_develop, ensured_targets=ensured_targets
)
setup_args["data_files"] = get_data_files(data_files_spec)
except ImportError as e:
import logging

logging.basicConfig(format="%(levelname)s: %(message)s")
logging.warning("Build tool `jupyter-packaging` is missing. Install it with pip or conda.")
logging.warning(
"Build tool `jupyter-packaging` is missing. Install it with pip or conda."
)
if not ("--name" in sys.argv or "--version" in sys.argv):
raise e

Expand Down

0 comments on commit c202433

Please sign in to comment.