javascript dependencies in python project : <p>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 <a href="https://github.com/mathjax/MathJax-node" rel="noreferrer">MathJax-node</a>). In the latter case I have to use <code>npm</code> 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 <code>send_from_directory</code> function).</p>

<p>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 <code>node</code> and <code>npm</code> are already available.</p>

<p>I can just put all the javascript sources I need into my distribution itself, but maybe there's a better way to do it?</p>
