-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pil's recipe migrated to Pillow (Fixed Headers) #786
Conversation
Switching to pillow is definitely a good change, but maybe it should be a new recipe ('pillow'). On the other hand, I know it's a total pil replacement, so maybe that doesn't matter. |
I already thought about creating a new recipe but finally I decided to keep the initial PIL recipe to not create confusion, avoid duplicates and, this way, all the users who use the PIL recipe will receive the update silently without changing any build script that already has. If you think that create a new recipe for pillow is the right way to go it could be done easily, so, only tell me and I will do the necessary changes. |
As long as any recipe depending on pil still builds and works with pillow, i think it could be merged in this way, would be better than having to manually switch all of them to pillow… |
That was an interesting pull request, it's a shame we didn't make it to the end :'( |
Not currently available, refs: kivy/python-for-android#786
@AndreMiras You can still pull from that branch to preserve the original author's changes, rebase it and finish if you want because I'm not sure if @opacam still knows what's going on in there. Also, there's probably a problem with #793 not being merged, which was mentioned as a dependency for this PR. |
It has been tested with sdl2 bootstrap (on a phone with android 7.0, nougat) but needs more testing before merged... Notice that the current recipes for freetype and harfbuzz are made in some way that the generated libraries are not included into the final apk (probably to avoid conflicts with the distributed android libs...same problem happened to the old openssl recipe, until changed to versioned library). Or...may be it will require to change some other recipes non related with this recipe in order to make it fully functionable...for all Android versions The affected recipes/files I think would be: freetype, harfbuzz and PythonUtil.java file for all bootstraps. Should I made a pull request with mentioned versioned libs and patched pil recipe? |
I have to say, I love the release early release often approach. So if it's working on most of our use cases, why not merging it? At some point the best way to find out is to just spread it :) |
For what it's worth, @inclement guided me on how to best try to resolve the current merge conflict. The result is here: https://github.com/JonasT/python-for-android/tree/updates-pil (You can test it with However, it doesn't work because there seems to be a problem with the build flags:
It appears the compiler is called with both the proper directories like So the order or something about the |
Hi @Jonast, I have created a working recipe for pillow: https://github.com/plapadoo/python-for-android/tree/feature-pillow/pythonforandroid/recipes/Pillow I also came accross the issue with the wrong My recipe is only tested with python3crystax and it contains a hardcoded path. So I will not contribute it, but maybe it helps you to get your PR done. Feel free to copy & paste from my recipe if you find it useful. |
@krinnewitz it's not really my pull request to start with, I just tried to see if it works on latest master (obviously doesn't). I barely understand how the whole cflags magic in p4a works, so I'd probably need ten times as long to actually get it to work than someone who has an idea what all of it actually does... so I don't think I'm a good pick to finish it. However, I'll see if your hardcoded path version works for me for the time being to just get my app to somehow to launch Edit: and I'm for sure the wrong person to advise on how to get rid of the hardcoded path. I barely now anything about the NDK myself |
@Jonast ok, no problem ;) Thanks anyway for sharing your work on a Pillow recipe. When you test my recipe, please let me know if it works for you. Maybe I will try to contribute it someday. |
@krinnewitz I tried plapadoo@eaa9bad and it built just fine for me. I also like that you named it I didn't test actually using it at runtime yet since I'm stuck on troubles with lzma right now, but it looks pretty promising! 🎉 |
Ok, I just managed to get my app to run and tested it. @krinnewitz 's Why I think @krinnewitz 's code should be merged:
|
Thanks for you feedback @Jonast. I have already fixed the hard-coded path. Currently, there are issues with my Pillow recipe under python 2.7. I will try to fix it and create a PR soon! |
@krinnewitz right now putting Sorry if I sound pushy, this change is pretty huge for me so don't mind me being super excited about it 😀 🎉 |
Why don't you guys create a dedicated pull request out of it? |
Thanks you all for the efforts, we made it 😄 |
Yay! 😍 |
This PR has the words "optional for Python 2.7.11" to keep reference to the original PR #775 (Python 2.7.11). This depends on PRs: #784, #785 and #793.
I migrated the Pil's recipe to Pillow because that last one is better maintained and more updated.
This PR could work without all the stuff related with Python 2.7.11 but it would need some little changes into the libpng's recipe (#785) to avoid conflicts with the current state of pygame's build.