I renamed this issue and contents a couple of times because I'm silly and confused about PIL & pillow. Anyway, the state is that none of them are available with python3crystax since PIL is hard-wired to python 2 and --requirements=pillow doesn't work, since without a recipe it packages the wrong .so library (incorrect architecture). That means, effectively, no PIL/pillow for any python 3 app which is unfortunate :cry:
old issue text:
The "pil" recipe is misguidedly hardwired to python 2:
depends = ['python2', 'png', 'jpeg']
This breaks the build with Python 3:
# p4a apk --debug --private /my-app/ --orientation user --window --package=org.example.myapp --name "My application" --version 0.1 --bootstrap=sdl2 --requirements=python3crystax,pil,sdl2,pysdl2,pyjnius --arch=armeabi-v7a
[INFO]: Will compile for the following archs: armeabi-v7a
[INFO]: Found Android API target in $ANDROIDAPI
[INFO]: Available Android APIs are (19)
[INFO]: Requested API target 19 is available, continuing.
[INFO]: Found NDK dir in $ANDROIDNDK
[INFO]: Got NDK version from $ANDROIDNDKVER
[INFO]: Using Crystax NDK 10.3.2
[INFO]: Found virtualenv at /usr/bin/virtualenv
[INFO]: ccache is missing, the build will not be optimized in the future.
[INFO]: Found the following toolchain versions: ['4.9', '5', 'clang3.6', 'clang3.7']
[INFO]: Picking the latest gcc toolchain, here 5
[INFO]: No existing dists meet the given requirements!
[INFO]: No dist exists that meets your requirements, so one will be built.
[ERROR]: Didn't find any valid dependency graphs.
[ERROR]: This means that some of your requirements pull in conflicting dependencies.
[ERROR]: Exiting.
I suggest this should be fixed.
Based on a conversation in IRC chat, it seems like this is actually a fault in the pil recipe being hardcoded for Python 2 instead of working with both. I updated the ticket description accordingly.
From what I recall PIL is deprecated upstream and not compatible with Python3 (also see https://github.com/kivy/python-for-android/commit/c60e02d2e32e31a3a754838c51e9242cbadcd9e8). Pillow is the one that should be used https://github.com/kivy/python-for-android/pull/786 but it's in work in progress.
Yeah I use pillow in my desktop build. Without it, there's no way I can ever port this application to Android. :cry:
Yep I also need it for one of my apps, but don't have time recently to help with the pull request. If you feel like it please take a look. In the meantime, do you think we can close this issue since PIL is not Python3 compatible upstream anyway?
Well the problem really is that with Python 3, you have no (PIL)low of any kind. I don't see how that is resolved. I renamed it confused by the situation about the old PIL and python 3 support, but that's because I'm a silly person, not because it would no longer be an issue
I changed it back now, sorry for the confusion :fearful: I won't touch the issue description anymore now, I promise
I understand, it's not resolved, my point it's it's already being addressed in https://github.com/kivy/python-for-android/pull/786 so somehow duplicated even though far from being resolved.
Edit: but I'm fine leaving it open :smile:
Well I suggest it would be a good point to close this once the pull request is actually merged! (I think that's how it is commonly done in other projects: having both a ticket & associated pull request) However, if you think it should be closed now, I can close it if you want. It's not like I wanna manage your project for you or something
Most helpful comment
https://github.com/kivy/python-for-android/pull/1339 merged