Use Pillow-compatible imports.
authorRadek Czajka <radoslaw.czajka@nowoczesnapolska.org.pl>
Tue, 16 Jul 2013 09:41:45 +0000 (11:41 +0200)
committerRadek Czajka <radoslaw.czajka@nowoczesnapolska.org.pl>
Tue, 16 Jul 2013 09:41:45 +0000 (11:41 +0200)
librarian/cover.py
setup.py

index a37b911..8b770ca 100644 (file)
@@ -4,7 +4,7 @@
 # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
 #
 import re
-import Image, ImageFont, ImageDraw, ImageFilter, ImageEnhance
+from PIL import Image, ImageFont, ImageDraw, ImageFilter, ImageEnhance
 from StringIO import StringIO
 from librarian import get_resource, OutputFile, URLOpener
 
index 51003ef..b20040a 100755 (executable)
--- a/setup.py
+++ b/setup.py
@@ -32,7 +32,10 @@ setup(
     package_data={'librarian': ['xslt/*.xslt', 'epub/*', 'mobi/*', 'pdf/*', 'fb2/*', 'fonts/*', 'res/*'] +
                                 whole_tree(os.path.join(os.path.dirname(__file__), 'librarian'), 'font-optimizer')},
     include_package_data=True,
-    install_requires=['lxml>=2.2'],
+    install_requires=[
+        'lxml>=2.2',
+        'Pillow',
+    ],
     scripts=['scripts/book2html',
              'scripts/book2txt',
              'scripts/book2epub',