From 35c0909e8b8162a3b34ce7457abdff85afd29420 Mon Sep 17 00:00:00 2001 From: Haridas N Date: Tue, 18 Sep 2018 22:55:29 +0530 Subject: [PATCH] Make the markdown package requirement explicit. Similar changes had been done on this fix (Fixes #1234). When using markdown documents currently the error messages doesn't say the actual error, which forces the developer to debug the pelican code to spot the bug. This fix will explicitly enforce the required dependency. --- pelican/readers.py | 5 +---- setup.py | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/pelican/readers.py b/pelican/readers.py index 842602aa..a68836ad 100644 --- a/pelican/readers.py +++ b/pelican/readers.py @@ -21,10 +21,7 @@ from pelican.contents import Author, Category, Page, Tag from pelican.utils import SafeDatetime, escape_html, get_date, pelican_open, \ posixize_path -try: - from markdown import Markdown -except ImportError: - Markdown = False # NOQA +from markdown import Markdown # NOQA # Metadata processors have no way to discard an unwanted value, so we have # them return this value instead to signal that it should be discarded later. diff --git a/setup.py b/setup.py index 06da7628..6ef896de 100755 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ from os.path import join, relpath from setuptools import setup requires = ['feedgenerator >= 1.9', 'jinja2 >= 2.7', 'pygments', 'docutils', - 'pytz >= 0a', 'blinker', 'unidecode', 'six >= 1.4', + 'pytz >= 0a', 'blinker', 'unidecode', 'six >= 1.4', 'markdown', 'python-dateutil'] entry_points = {