-
Notifications
You must be signed in to change notification settings - Fork 508
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
Buildozer Python 3 Compatability Issues #175
Comments
Kivy developers, please tell me if you want this patch implemented in a different way before I make a pull request. fd.write(line.decode('utf-8')) Becomes: if sys.hexversion < 0x03000000:
fd.write(line) Or: if 'python3' not in sys.executable:
fd.write(line) |
New Traceback, this one was caused by adding a service to my kivy app.
|
One way to patch this is that data = header + data
with open(main_py, 'wb') as fd:
fd.write(data) Becomes: data = header + str(data, 'utf8')
with open(main_py, 'wb') as fd:
fd.write(bytes(data, 'utf8')) But I am not sure if that will be Python 2 compatable. Probably not given the use of bytes(). |
In the buildozer.init, you have IS_PY3 available that you can use for having a different behavior :) |
OK I will adjust the code to use IS_PY3. |
@tito I applied the patches as requested but Buildozer still fails full log attached. Same patches worked on 0.26, so must be something relatively recent. |
There is also another bug where it fails the application build step with python3, but python-for-android doesnt support python3 yet. Error given: /usr/bin/python3.4 build.py --name 'My Application' --version 0.0.1 --package org.test.myapp --private /home/sagar/Repositories/Scripts/Projects/contributions/Test App/.buildozer/android/app --sdk 24 --minsdk 14 --orientation landscape debug |
Now , Buildozer Python 3 Compatability 100% ? |
WIth #321 merged, I can successfully build an APK with Python 3.4.3 on OS X. With my unmerged PRs #323 and kivy/python-for-android#720, I can also build an APK with the android_new (p4a revamp) target. This issue references multiple different problems, and it looks like they have either been fixed or I cannot duplicate them with the current code. I'm going to close this issue; if any of these problems persist please open a separate issue for each problem. |
I will be posting any bugs I come across and their associated patches. Once I have buildozer working all of the way I will make a pull request.
Here is the first traceback I recieved using Buildozer with Python3.
The text was updated successfully, but these errors were encountered: