From 85ab1e2d4b363dc747eacda08fa254586905cf25 Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Tue, 16 Jul 2013 11:41:45 +0200 Subject: [PATCH 1/1] Use Pillow-compatible imports. --- librarian/cover.py | 2 +- setup.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/librarian/cover.py b/librarian/cover.py index a37b911..8b770ca 100644 --- a/librarian/cover.py +++ b/librarian/cover.py @@ -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 diff --git a/setup.py b/setup.py index 51003ef..b20040a 100755 --- 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', -- 2.20.1