From 17999c5b1ac04dd170122f5045728eae433a684f Mon Sep 17 00:00:00 2001
From: "Eevee (Alex Munroe)" <eevee.git@veekun.com>
Date: Mon, 5 Oct 2015 08:19:13 -0700
Subject: [PATCH] Try to fix Python 2.6 build

Apparently the latest markdown no longer works against py2.6; Travis
fails on trying to import importlib.  I added a dependency on the PyPI
backport to see if that helps for now.
---
 setup.py | 22 +++++++++++++++-------
 1 file changed, 15 insertions(+), 7 deletions(-)

diff --git a/setup.py b/setup.py
index 4373e13..a330d68 100644
--- a/setup.py
+++ b/setup.py
@@ -1,4 +1,18 @@
 from setuptools import setup, find_packages
+
+import sys
+
+deps = [
+    'SQLAlchemy>=0.9.7',
+    'whoosh>=2.5,<2.7',
+    'markdown',
+    'construct',
+    'six>=1.9.0',
+]
+if sys.version_info < (2, 7):
+    # We don't actually use this, but markdown does
+    deps.append('importlib')
+
 setup(
     name = 'Pokedex',
     version = '0.1',
@@ -7,13 +21,7 @@ setup(
     package_data = {
         'pokedex': ['data/csv/*.csv']
     },
-    install_requires=[
-        'SQLAlchemy>=0.9.7',
-        'whoosh>=2.5,<2.7',
-        'markdown',
-        'construct',
-        'six>=1.9.0',
-    ],
+    install_requires=deps,
 
     entry_points = {
         'console_scripts': [