chiark / gitweb /
pelican-theme, m.code, m.dot: make stuff finally work on Pelican 4.5.1+.
authorVladimír Vondruš <mosra@centrum.cz>
Sun, 2 Jan 2022 16:29:27 +0000 (17:29 +0100)
committerVladimír Vondruš <mosra@centrum.cz>
Sun, 2 Jan 2022 18:21:30 +0000 (19:21 +0100)
commit47c005b8523437ff28001c8c47a6360f985c2a28
treec84982e7c84c2008488bcfcf53e863f474c89420
parent560cad4552a7863880c3445158043c449209bebc
pelican-theme, m.code, m.dot: make stuff finally work on Pelican 4.5.1+.

Since Pelican 4.5 moved to "namespace plugins", the way plugins are
loaded is different and thus the root plugins/ directory is not in PATH
anymore, leading to errors like

    No module named 'ansilexer'
    No module named 'latex2svg'

After spending a bit of time looking into how "namespace plugins" are, I
decided to stay with what they say "legacy plugins" because that doesn't
require me to move everything into a pelican.plugins namespace and thus
allows me to reuse the exact same file for plugins to other m.css tools
like the Python doc generator.

Version 4.5.0 had loading of namespaced plugins (the `m.` here) broken
completely, which is why the CI got pinned to 4.2. With 4.5.1 it started
working again and due to how the tests were executed the PATH issues
weren't hit either, leading me to a false sense of security that
everything works again on 4.5.1, while it wasn't. This fix is the final
piece to make everything work again. Sorry that it took over a year to
get in.

Co-authored-by: Lukas Pirl <git@lukas-pirl.de>
package/ci/circleci.yml
pelican-theme/test/test_page.py
plugins/m/code.py
plugins/m/dot.py
plugins/m/math.py