mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-13 10:46:16 +03:00
require, required, and want are not features
This commit is contained in:
parent
f869ecd808
commit
bf2df86807
14
setup.py
14
setup.py
|
@ -100,10 +100,15 @@ LCMS_ROOT = None
|
||||||
|
|
||||||
class pil_build_ext(build_ext):
|
class pil_build_ext(build_ext):
|
||||||
class feature:
|
class feature:
|
||||||
zlib = jpeg = tiff = freetype = tcl = tk = lcms = webp = webpmux = None
|
features = ['zlib', 'jpeg', 'tiff', 'freetype', 'tcl', 'tk',
|
||||||
jpeg2000 = None
|
'lcms', 'webp', 'webpmux', 'jpeg2000']
|
||||||
|
|
||||||
required = set(['jpeg', 'zlib'])
|
required = set(['jpeg', 'zlib'])
|
||||||
|
|
||||||
|
def __init__(self):
|
||||||
|
for f in self.features:
|
||||||
|
setattr(self, f, None)
|
||||||
|
|
||||||
def require(self, feat):
|
def require(self, feat):
|
||||||
return feat in self.required
|
return feat in self.required
|
||||||
|
|
||||||
|
@ -111,9 +116,8 @@ class pil_build_ext(build_ext):
|
||||||
return getattr(self, feat) is None
|
return getattr(self, feat) is None
|
||||||
|
|
||||||
def __iter__(self):
|
def __iter__(self):
|
||||||
for x in dir(self):
|
for x in self.features:
|
||||||
if x[1] != '_':
|
yield x
|
||||||
yield x
|
|
||||||
|
|
||||||
feature = feature()
|
feature = feature()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user