It was EOL'd in March 2019 and I don't want to bother with it anymore.
``pelicanconf.py``. This plugin assumes presence of
`m.htmlsanity <{filename}/plugins/htmlsanity.rst>`_.
-.. note-danger::
-
- Note that this plugin, unlike most of the others, requires at least Python
- 3.5 to run properly.
-
.. code:: python
PLUGINS += ['m.htmlsanity', 'm.math']
``m.dot`` package to your :py:`PLUGINS` in ``pelicanconf.py``. For the
Python doc theme, it's enough to just list it in :py:`PLUGINS`.
-.. note-danger::
-
- Note that this plugin, unlike most of the others, requires at least Python
- 3.5 to run properly.
-
.. code:: python
PLUGINS += ['m.dot']
.. note-danger::
In order to use the m.css theme or `plugins <{filename}/plugins.rst>`_, you
- need to install Pelican 4 and the Python 3 version of it. Most of the
- plugins work with Python 3.4, while some (such as the
- `math plugin <{filename}/plugins/math-and-code.rst#math>`_) need 3.5.
- Python 2 is not supported and compatibility with Pelican 3.7 has been
- dropped.
+ need to install Pelican 4 and the Python 3 version of it. The theme and
+ plugins work with Python 3.5 and newer. Python 2 is not supported and
+ compatibility with Pelican 3.7 has been dropped.
.. code:: sh
import re
import subprocess
-import sys
import unittest
from distutils.version import LooseVersion
def __init__(self, *args, **kwargs):
super().__init__(__file__, '', *args, **kwargs)
- @unittest.skipUnless(LooseVersion(sys.version) >= LooseVersion("3.5") and
- LooseVersion(dot_version()) >= LooseVersion("2.40.1"),
- "The dot plugin requires at least Python 3.5 installed. Dot < 2.40.1 has a completely different output.")
+ @unittest.skipUnless(LooseVersion(dot_version()) >= LooseVersion("2.40.1"),
+ "Dot < 2.40.1 has a completely different output.")
def test(self):
self.run_pelican({
'PLUGINS': ['m.htmlsanity', 'm.components', 'm.dot'],
self.assertEqual(*self.actual_expected_contents('page.html'))
- @unittest.skipUnless(LooseVersion(sys.version) >= LooseVersion("3.5") and
- LooseVersion(dot_version()) < LooseVersion("2.40.1"),
- "The dot plugin requires at least Python 3.5 installed. Dot < 2.40.1 has a completely different output.")
+ @unittest.skipUnless(LooseVersion(dot_version()) < LooseVersion("2.40.1"),
+ "Dot < 2.40.1 has a completely different output.")
def test_238(self):
self.run_pelican({
'PLUGINS': ['m.htmlsanity', 'm.components', 'm.dot'],
import os
import pickle
-import sys
import shutil
import unittest
from hashlib import sha1
-from distutils.version import LooseVersion
-
from . import PelicanPluginTestCase
class Math(PelicanPluginTestCase):
def __init__(self, *args, **kwargs):
super().__init__(__file__, '', *args, **kwargs)
- @unittest.skipUnless(LooseVersion(sys.version) >= LooseVersion("3.5") and shutil.which('latex'),
- "The math plugin requires at least Python 3.5 and LaTeX installed")
+ @unittest.skipUnless(shutil.which('latex'),
+ "The math plugin requires LaTeX installed")
def test(self):
self.run_pelican({
'PLUGINS': ['m.htmlsanity', 'm.components', 'm.math'],