Add another way to check for Pillow
This commit is contained in:
parent
fcc075b656
commit
b450098508
1 changed files with 6 additions and 4 deletions
10
setup.py
10
setup.py
|
|
@ -57,6 +57,7 @@ def build_qt():
|
||||||
'all',
|
'all',
|
||||||
'PYUIC=%s%s' % (pyuic4, ' WIN32=1' if sys.platform == 'win32' else '')])
|
'PYUIC=%s%s' % (pyuic4, ' WIN32=1' if sys.platform == 'win32' else '')])
|
||||||
|
|
||||||
|
|
||||||
def install_weboob():
|
def install_weboob():
|
||||||
scripts = set(os.listdir('scripts'))
|
scripts = set(os.listdir('scripts'))
|
||||||
packages = set(find_packages(exclude=['modules']))
|
packages = set(find_packages(exclude=['modules']))
|
||||||
|
|
@ -109,7 +110,6 @@ def install_weboob():
|
||||||
('share/icons/hicolor/64x64/apps', glob.glob('icons/*')),
|
('share/icons/hicolor/64x64/apps', glob.glob('icons/*')),
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
# Do not put PyQt, it does not work properly.
|
# Do not put PyQt, it does not work properly.
|
||||||
requirements = [
|
requirements = [
|
||||||
'lxml',
|
'lxml',
|
||||||
|
|
@ -124,10 +124,11 @@ def install_weboob():
|
||||||
except ImportError:
|
except ImportError:
|
||||||
requirements.append('Pillow')
|
requirements.append('Pillow')
|
||||||
else:
|
else:
|
||||||
if 'PILcompat' not in Image.__file__:
|
# detect Pillow-only feature, or weird Debian stuff
|
||||||
requirements.append('PIL')
|
if hasattr(Image, 'alpha_composite') or 'PILcompat' in Image.__file__:
|
||||||
else:
|
|
||||||
requirements.append('Pillow')
|
requirements.append('Pillow')
|
||||||
|
else:
|
||||||
|
requirements.append('PIL')
|
||||||
|
|
||||||
if sys.version_info[0] > 2:
|
if sys.version_info[0] > 2:
|
||||||
print >>sys.stderr, 'Python 3 is not supported.'
|
print >>sys.stderr, 'Python 3 is not supported.'
|
||||||
|
|
@ -168,6 +169,7 @@ def install_weboob():
|
||||||
install_requires=requirements,
|
install_requires=requirements,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
class Options(object):
|
class Options(object):
|
||||||
hildon = False
|
hildon = False
|
||||||
qt = False
|
qt = False
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue