Skip to content

Commit 959c2ea

Browse files
committed
Added pil wrapper for pillow recipe
1 parent cd3d18f commit 959c2ea

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
from pythonforandroid.recipes.Pillow import PillowRecipe
2+
from pythonforandroid.logger import warning
3+
4+
class PilRecipe(PillowRecipe):
5+
"""A transparent wrapper around the Pillow recipe, it should build
6+
Pillow automatically as if "pillow" were specified in the
7+
requirements.
8+
"""
9+
10+
name = 'Pillow' # ensures the Pillow recipe directory is used where necessary
11+
12+
conflicts = ['pillow']
13+
14+
def build_arch(self, arch):
15+
warning('PIL is no longer supported, building Pillow instead. '
16+
'This should be a drop-in replacement.')
17+
warning('It is recommended to change "pil" to "pillow" in your requirements, '
18+
'to ensure future compatibility')
19+
super(PilRecipe, self).build_arch(arch)
20+
21+
22+
recipe = PilRecipe()

0 commit comments

Comments
 (0)