-
Notifications
You must be signed in to change notification settings - Fork 1
Building
To prevent the end user from needing literary
, a manual literary build
step can be performed. This will use the configuration file to determine where to place the generated Python module. It is recommended that this be lib/<PACKAGE_NAME>
in the root of the project.
Then, conventional packaging tools can be used, e.g.
Example pyproject.toml
:
[tool.poetry]
# ...
packages = [
{ include = "<PACKAGE_NAME>", from = "lib" },
]
Example setup.cfg
:
[options]
packages = find:
package_dir =
=lib
[options.packages.find]
where = lib
The literary-build
package provides a setuptools-derived PEP 517 backend for building literary projects before an sdist
or bdist_wheel
build. To use this backend, the pyproject.toml
file becomes
[build-system]
requires = ["setuptools>=40.6.0", "wheel", "literary-build>=1.0.2,<1.1.0"]
build-backend = "literary.build_meta"
and the setuptools.cfg
should contain the sections outlined above in the Manual Build section.
The literary-build
backend has to set JUPYTER_PATH
in order for the Jupyter data files to be found. This is only required for the pip isolated build feature, which is enabled by default. Other tools like pyproject-build
(build
on PyPI) create a new venv for the build environment, which behaves as expected.
Development of Literate notebooks using the IPython extension.
- Setting up the Environment
- Loading the IPython Extension
- Cell Exports
- Patching Classes
- Recommended Extensions
Building packages from a collection of Literate notebooks.