I'm writing software that allows one to publish mathematical books as websites. It is based mostly on Python + Flask, but to deal with equations I'm using MathJax. MathJax can be used either client-side or server-side (through MathJax-node). In the latter case I have to use npm
to install MathJax-node in some place accessible to my main Python script, then invoke it from the script. In the former case, I have to provide MathJax.js as an asset, available to client (currently I use Flask's send_from_directory
function).
My question is: what is the best practice of dealing with such heterogenous dependencies in Python? My goal is to make installation process as simple as possible at least on unix-like systems (Linux or MacOS), provided that node
and npm
are already available.
I can just put all the javascript sources I need into my distribution itself, but maybe there's a better way to do it?