Hatch Jupyter Builder is a Hatch plugin designed to streamline the building and packaging of Jupyter-related projects, such as JupyterLab extensions, JupyterLite applications, and kernels. It integrates frontend build steps (e.g., npm/yarn) directly into the Python packaging process, ensuring consistent builds and proper inclusion of static assets. The current version is 0.9.1, with a release cadence of regular patch and minor updates addressing bug fixes and enhancements.
pip install hatch hatch-jupyter-builderVerified import paths — ran on the pinned version, not inferred.
This `pyproject.toml` snippet demonstrates how to configure `hatch-jupyter-builder` for a project that includes a JavaScript/TypeScript frontend. It enables the 'jupyter' builder for wheel targets and defines a `jupyter` build hook to execute `npm` commands within a specified `build-dir`.
Refer to the `hatch-jupyter-builder` official documentation and examples for the equivalent `pyproject.toml` configuration tailored to your project's specific build requirements.
Carefully review your `pyproject.toml` file, paying close attention to the `[tool.hatch.build.hooks.jupyter]` section. Verify that all paths (e.g., `build-dir`, `ensured-targets`) are correct relative to your `pyproject.toml` and that the specified frontend commands execute successfully in isolation.
Upgrade `hatch-jupyter-builder` to version 0.8.0 or newer to utilize `optional-editable-build`. If upgrading is not possible, remove this option from your `pyproject.toml` configuration.