A hatch plugin to help build Jupyter packages
Project description
hatch-jupyter-builder
This provides a build hook plugin for Hatch that adds a build step for use with Jupyter packages.
Table of Contents
Installation
pip install hatch-jupyter-builder
License
hatch-jupyter-builder
is distributed under the terms of the MIT license.
Usage and Configuration
The build hook plugin name is jupyter-builder
.
-
pyproject.toml
[tool.hatch.build.targets.wheel.hooks.jupyter-builder] dependencies = ["hatch-jupyter-builder"] build-function = "hatch_jupyter_builder.npm_builder" ensured-targets = ["foo/generated.txt"] [tool.hatch.build.targets.wheel.hooks.jupyter-builder.build-kwargs] build_cmd = "build:src"
Options
The only required fields are dependencies
and build-function
.
The build function is defined as an importable string with a module and a function name, separated by a period. The function must accept a
target_name
(either "wheel" or "sdist"), and a version
(either "standard" or "editable") as its only positional arguments. E.g.
-
builder.py
def build_func(target_name, version): ...
Would be defined as build-function = "builder.build_func"
The optional ensured-targets
is a list of expected file paths after building a
"standard" version sdist or wheel.
The optional build_kwargs
is a set of keyword arguments to pass to the build
function.
Npm Builder Function
This library provides a convenenice npm_builder
function which can be
used to build npm
assets as part of the build.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for hatch_jupyter_builder-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1e1fe3323dca05f51f1eaf6c1d0b0b30d7506451ebf2089092fc14b0427a2d9e |
|
MD5 | d2abdda206681d8a17e5fc33689a5d7d |
|
BLAKE2b-256 | d09ea196322412107817108e77306eadab804245c846d5edca5ae9fa2c1e3225 |
Hashes for hatch_jupyter_builder-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a6ef0585709713f40e868ddf1f39bdeb445d7a3d3731813334349c0f91405e19 |
|
MD5 | 7f35dab63cc0b4e2eea6dd8d440c45ba |
|
BLAKE2b-256 | 24110a2e38b808d1dcbfd76ae0030a7a31c1eb5dad07d018b8d0e5df228d59a2 |