Files
zeekayandHanzo Dev b90a6fbb8f jupyter builds with pnpm, the workspace's package manager
`pnpm --filter @hanzo/jupyter build` failed on its first command. The
scripts called jlpm, JupyterLab's pinned Yarn, which will not run in a
directory inside a project it does not know: "The nearest package
directory (packages/jupyter) doesn't seem to be part of the project
declared in" the repository root. The scripts, the hatch build hook that
`pip install .` runs, the README and .gitignore now name pnpm.

The labextension step is still `jupyter labextension build`, so
JupyterLab must be on PATH, and the README says so. With JupyterLab 4.6.3
on PATH the build now compiles and bundles the extension.

Co-authored-by: Hanzo Dev <[email protected]>
2026-09-19 09:12:10 -07:00

60 lines
2.1 KiB
TOML

# Python packaging for the prebuilt JupyterLab extension. `pip install .` runs
# `pnpm build:prod` (via hatch-jupyter-builder) to produce the federated bundle
# under hanzo_jupyter/labextension, then ships it as data files JupyterLab
# discovers at import. This is the standard JupyterLab 4 prebuilt-extension
# layout (hatchling + hatch-jupyter-builder).
[build-system]
requires = ["hatchling>=1.5.0", "jupyterlab>=4.0.0,<5", "hatch-nodejs-version>=0.3.2"]
build-backend = "hatchling.build"
[project]
name = "hanzo_jupyter"
version = "0.1.0"
description = "Hanzo AI for JupyterLab — an in-notebook AI assistant (side panel + cell actions)."
readme = "README.md"
license = { text = "MIT" }
authors = [{ name = "Hanzo AI" }]
keywords = ["Jupyter", "JupyterLab", "JupyterLab4", "AI", "Hanzo"]
classifiers = [
"Framework :: Jupyter",
"Framework :: Jupyter :: JupyterLab",
"Framework :: Jupyter :: JupyterLab :: 4",
"Framework :: Jupyter :: JupyterLab :: Extensions",
"Framework :: Jupyter :: JupyterLab :: Extensions :: Prebuilt",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
]
requires-python = ">=3.8"
dependencies = []
[project.urls]
Homepage = "https://github.com/hanzoai/extension"
[tool.hatch.build.targets.wheel.shared-data]
"hanzo_jupyter/labextension" = "share/jupyter/labextensions/@hanzo/jupyter"
"install.json" = "share/jupyter/labextensions/@hanzo/jupyter/install.json"
[tool.hatch.build.targets.sdist]
artifacts = ["hanzo_jupyter/labextension"]
exclude = [".github", "node_modules", "lib"]
[tool.hatch.build.hooks.jupyter-builder]
dependencies = ["hatch-jupyter-builder>=0.5"]
build-function = "hatch_jupyter_builder.npm_builder"
ensured-targets = [
"hanzo_jupyter/labextension/static/style.js",
"hanzo_jupyter/labextension/package.json",
]
skip-if-exists = ["hanzo_jupyter/labextension/static/style.js"]
[tool.hatch.build.hooks.jupyter-builder.build-kwargs]
build_cmd = "build:prod"
npm = ["pnpm"]
[tool.hatch.build.hooks.jupyter-builder.editable-build-kwargs]
build_cmd = "build"
npm = ["pnpm"]
source_dir = "src"
build_dir = "hanzo_jupyter/labextension"