-
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
Python 2.7.11 & Updates (Only for testing purposes) #693
Conversation
Update from origin master
# Conflicts: # pythonforandroid/recipes/python2/__init__.py
…e with openssl libs
…ues with harbfbuzz's support for freetype
…nto python-2.7.11
…reetype and harfbuzz
…en cloning or when downloading .zip package)
SDL2'S UPDATE:
@inclement, @kived, @brussee and @dessant: You showed some interest with this pull request...what do you think? NOTE:: I recently notice that the user @brussee has made a pull request for updating the sdl2 libraries (pull #708, pull #709, pull #710 and pull #713), this is great!!! I go further and integrates jpeg, freetype, and png recipes into sdl2's bootstrap. |
Sorry if this will be a stupid question but i'm new with github repository and i'm not very able to do thing with it. I use it for build my apk and i like to test your updates. thanks for your help. |
I'm not using buildozer for my build system, but i found that you can use a custom python-for-android, just by editing your buildozer spec file and setting the variable "android.p4a_dir", so... You can install the python-for-android with pip (if you don't wont to make changes to the source code) or clone the repo and switch to the python-2.7.11 branch (if you want to make modifications): The pip command: To clone the repo and switch to python-2.7.11 branch:
Then you can edit your buildozer spec file and set the variable "android.p4a_dir" to point to the location of the recently installed or cloned python-for-android repository I guess that this way you can test it within buildozer |
Sorry if i give you even bother, but I've done:
and then in the buildozer.spec i tried:
this is the 2.7.11 package (i checked it) but in the logcat is always showed
Thus, is there something wrong? thanks
|
I think that the problem is that, despite you has updated your python-for-android, buildozer is detecting that you already have a working distribution, the one you has builded with the old python-for-android...so... skips the build (as you noticed with the logcat you posted...the build date is april 5). You must delete/backup your old build files, that way buildozer will build all the stuff again with the updated python-for-android. I thing that you can remove the old files in two ways:
Note Buildozer spec: I think that the p4a's path for the buildozer spec file is one of this two: "android.p4a_dir = /usr/local/lib/python2.7/dist-packages/pythonforandroid/" or the same without the final slash Good Luck!!! |
ok, i've tried to copy distribute.sh in /usr/local/lib/python2.7/dist-packages/pythonforandroid/ folder and now instead of not found i get access denied. The problem is that i can't find where is located the distribute.sh in the default distribution. p.s.: but the distribute.sh isn't obsolete? |
You're right, the distribute.sh file is not used anymore. My suggestions:
PD: Do you have the latest version of buildozer installed which enables support for the p4a's new toolchain?...if not ...first of all you must upgrade your buildozer |
I have done all you suggest. I've removed the distribute.sh from python 2.7.11 and update it. This is my last try:
My buildozer version is:
Is the right version? You advise me to forget buildozer and try directly with P4A? |
You have the latest published version of buildozer but probably without python-for-android toolchain support because your buildozer keeps trying to run the distrubute.sh command (check the commits of the buildozer project at https://github.com/kivy/buildozer/commits/master). If you want to be sure that you have support for the new toolchain just work with a cloned repo of the buildozer project or install it via pip command directly from the git repo (pip install https://github.com/kivy/buildozer/archive/master.zip, for you with "sudo"). About trying directly from p4a...juas, juas, juas.. I asked myself this question a long time ago...I tried buildozer but it din't work for me. It's an amazing tool that will solve a lot of troubles to configure the build system... but is in aplha state.. and it means that is not ready, yet, for a production system. Moreover, I already had my own build system configured and working. Be sure, that at some time, I will use buildozer, but now I don't have enough time to do it (right now I'm struggling to make a binary for my app for macos...with my hackintosh...jaja... packaging a python app is a pain in the ass...I think that for an apple system is worst...). Your case is different... you have buildozer configured and you have a succesful build of your apk, so, I will give another shoot: Try to update your buildozer, remove all the old stuff related with you python-for-android and try to build your apk again. If it does not work maybe you can try to use python-for-android directly, it is not so difficult, and you can take your current buildozer configuration to adapt to your system and avoid downloading ndk's android and sdk's again...that way you will have the choice to build from buildozer or directly from python-for-android Advice: If I were you, I would take seriuosly the buildozer's warning about running this tools with root privileges, unless you use xubuntu only for build your apk, because you can easely mess up your os, if you don't know what are you doing, because any system upgrade can broke your build system. Have you considered to install a python's virtual to develope your apk? That way you will keep your python environment isolated...of course...it doesn't matter if you use another os as your regular os PD: I think that this conversation is in the wrong place...the issues you have right now are related with buildozer project and I'm not the right person to help you with this, not because I don't wanna help you but my knowledge of buildozer is very poor, and you can be sure that the programmers contributing with the buildozer project, can solve this problem quicker and better than me. The force be with you!!! |
You're right, I'm sorry if I made you waste time. You've been very helpful. |
You don't have to apologize to me, glad to help you on whatever I can...this is only to keep the things ordered, despite I'm newbie at contributing to the p4a project, I'm pretty sure that the mantainers of this project, would like to keep all the things in his place because the kivy project is a big Project with a lot of subprojects as p4a or buildozer. So...Please...don't doubt to write if you find something wrong, or maybe something that I wrote need some explanation or anything related with this pull request... I hope You will solved the buildozer's quickly issues, maybe you are in the right way already...i hope so. If you still have troubles to fix the issues with buildozer, I would like to suggest to create a new issue whitin the buildozer's project, so this way we will keep the things ordered and, probably, you will be on the road faster So many thanks to be interested in this pull request, and I would like to to see you soon in this conversation to tell me that you have solved your problem and this new python recipe works well for you. ¡¡¡My best wishes and cheers!!! |
Thank you for all your work on this, however, I don't see this PR getting merged in its current state. It does way too much, much more than just updating the Python version. It really needs to be split into separate PRs so they can be reviewed and tested individually. Best practice is to keep each PR as small and specific as possible. If some parts of this work require the updated Python version, just note as such in the new PR and link to the Python PR. |
Ok, I will keep that in mind for future PR's. About this Pr... I will try to split it into several small PR to make it easy to review and test the changed code (I have already started the process of splitting the PR) For now, I will keep this open for those who want to test the whole package. I will close this PR when created the new ones. |
Python 2.7.11 & Updates
[This is only for testing purposes, because, as pointed by @kived, it modifies a lot of stuff, so very soon it will be created some small PR's that will be easier to review and test, so... THIS PR IS NOT TO MERGE and it will be closed soon]
The new python2 recipe supports optional dependencies: sqlite3, openssl and libffi
Important notes:
My Build Specs:
Thank to:
-Update:
After the latest commits and some testing, I can say that the PR for python-2.7.11 works as expected for pygame and sdl2 and it should compile and run for everyone (I hope so...)
Note: Would like to mention that the issues that i found with sdl2 were caused by my old kivy's config file and some button calls triggered by "on_press" event (this two caused that i receive duplicated events for almost all events in my app). After modifying the entry "input" for my kivy's config file and changing my calls "on_press" to "on_release"....all works as expected :))