Dependencies

Python

Imprint requires Python version 3.6 or higher.

Core

The core program depends only on three libraries in addition to the built-in Python libraries:

  • python-docx: A library for creating documents in Office Open XML format.
  • lxml: An XML manipulation libarary that is also a dependency of python-docx.
  • haggis: A suite of Python utilities developed by the author of Imprint to support common functionality across multiple tools, including Imprint itself. All additional dependencies come indirectly from Haggis.

Content-generation plugins generally tend to have a much wider set of dependencies.

Documentation

This documentation is built with sphinx (version >= 1.7.1 required).

The API documentation requires the napoleon extension, which is now bundled with sphinx itself.

The default viewing experience for the documentation is provided by the ReadTheDocs Theme, which is, however, optional. If installed, a version >= 0.4.0 is recommended[1].

Plugins

There is almost no restriction on what Imprint plugin code can depend on. In fact, plugins can use a wide variety of open source tools and libraries for tasks like graphics rendering and file conversion. Both Python libraries and external programs can be dependencies for plugins, since the Python subprocess module supports running arbitrary executables. The lists below show a sample[2] of dependencies used by the builtin:

Python Packages

  • numpy: A fast array library for Python. This supports most of the data processing done in Imprint as numpy arrays are virtually ubiquitous in Python. This is a dependency of scipy and pillow.
  • scipy: A scientific computation libary for Python. In addition to enhancements to numpy, it supplies interfaces to scientific file formats such as IDL files.
  • matplotlib: A plotting and graphics library for Python. Much of the data visualization is done through this library.
  • pandas: A spreadsheet library for easily manipulating tables.
  • pillow: A graphics file library for Python. Used to import images and convert image files.
  • natsort: A small natural text-sorting algorithm for Python. It provides advanced sorting techniques that are more intuitive than plain lexicorgaphical sorting, e.g., for strings containing both text and numbers.

External Programs

  • ImageMagick: A suite of image conversion programs suitable for almost any reasonable format. Mostly the convert program is used, e.g., to create LaTeX equations for the <latex> tag.
  • Poppler: A library for manipulating PDF files. In particular the pdftoppm program is used to convert PDF files into importable images.
  • GhostScript (gs): Converts PostScript documents into importable images. This is particularly useful for dealing with some of the more flexible backends provided by matplotlib, especially when it comes to LaTeX equations.
  • LaTeX: Some implementation of LaTeX is necessary to support in-text LaTeX equations. texlive and pdflatex are examples of implementations that have been used successfully in testing on Linux systems. Only documents containing the <latex> XML tag require this.
  • dvips: A converter between DVI and PostScript formats is necessary to bridge the formats supported by latex and convert. This is only a dependency for documents that contain <latex> tags. This program is almost always bundled with reasonable LaTeX distributions.

Dependence on external programs generally represents a restriction to portability across platforms. This is often not a major issue because many standard programs are available for Linux and Mac environments, and generally, a particular coniguration of Imprint plugins will be used in a fairly static environment.

Footnotes

[1]Versions prior to 0.4.0 had issues with the alignment of line numbers to code in the tutorial examples.
[2]These lists are not exhaustive, but should cover most of the interesting items encountered in general use. All items required for the Builtin Plugins are covered.