From 5ab37ea1b3390665d0f55853eadc0a148f59232b Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Tue, 21 Jul 2015 19:52:16 +0200 Subject: [PATCH] setup.py: move import PIL inside generate and add setup_requires on Pillow (#7899) Also remove double import of re. --- setup.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index af0b4a3..533e05c 100644 --- a/setup.py +++ b/setup.py @@ -7,11 +7,8 @@ import re import sys import subprocess import tempfile - import xml.etree.ElementTree as ET -import re -from PIL import Image -from PIL import PngImagePlugin + from distutils.cmd import Command from setuptools.command.install_lib import install_lib as _install_lib @@ -116,6 +113,8 @@ class build_icons(Command): def generate(self, src, dest, colour, width, **kwargs): # default values + from PIL import Image + from PIL import PngImagePlugin author = 'GNOME Project' license = 'Creative Commons Attribution-Share Alike 3.0' @@ -173,6 +172,9 @@ setup( 'XStatic_jQuery', 'XStatic_jquery_ui', ], + setup_requires=[ + 'Pillow', + ], classifiers=[ 'Development Status :: 4 - Beta', 'Environment :: Web Environment',