Skip to content

Using Python/Buildozer to compile Kivy for Android #628

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

Closed
montyonthebonty opened this issue Feb 26, 2018 · 3 comments
Closed

Using Python/Buildozer to compile Kivy for Android #628

montyonthebonty opened this issue Feb 26, 2018 · 3 comments

Comments

@montyonthebonty
Copy link

Hi

I'm trying to compile a Kivy project for Android using buildozer and it's not working. I've managed successfully in the past, but I think that a Mac upgrade has messed it up. The bit it seems to get stuck on is this:

[INFO]:    Downloading pyjnius from https://github.com/kivy/pyjnius/archive/master.zip
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/Users/chris/PycharmProjects/magicroster/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/toolchain.py", line 978, in <module>
    main()
  File "/Users/chris/PycharmProjects/magicroster/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/toolchain.py", line 975, in main
    ToolchainCL()
  File "/Users/chris/PycharmProjects/magicroster/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/toolchain.py", line 512, in __init__
    getattr(self, args.subparser_name.replace('-', '_'))(args)
  File "/Users/chris/PycharmProjects/magicroster/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/toolchain.py", line 149, in wrapper_func
    build_dist_from_args(ctx, dist, args)
  File "/Users/chris/PycharmProjects/magicroster/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/toolchain.py", line 193, in build_dist_from_args
    build_recipes(build_order, python_modules, ctx)
  File "pythonforandroid/build.py", line 551, in build_recipes
  File "pythonforandroid/recipe.py", line 307, in download_if_necessary
  File "pythonforandroid/recipe.py", line 353, in download
  File "pythonforandroid/recipe.py", line 151, in download_file
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib.py", line 245, in retrieve
    fp = self.open(url, data)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib.py", line 213, in open
    return getattr(self, name)(url)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib.py", line 443, in open_https
    h.endheaders(data)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 1038, in endheaders
    self._send_output(message_body)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 882, in _send_output
    self.send(msg)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 844, in send
    self.connect()
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 1263, in connect
    server_hostname=server_hostname)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py", line 363, in wrap_socket
    _context=self)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py", line 611, in __init__
    self.do_handshake()
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py", line 840, in do_handshake
    self._sslobj.do_handshake()
IOError: [Errno socket error] [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:661)
# Command failed: /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -m pythonforandroid.toolchain create --dist_name=magicwoo --bootstrap=sdl2 --requirements=kivy --arch armeabi-v7a --copy-libs --color=always --storage-dir=/Users/chris/PycharmProjects/magicroster/.buildozer/android/platform/build
# 
# Buildozer failed to execute the last command
# The error might be hidden in the log above this error
# Please read the full log, and search for it before
# raising an issue with buildozer itself.
# In case of a bug report, please add a full log with log_level = 2

Any ideas why?

Thanks
Chris

@inclement
Copy link
Member

I don't know what's happening here, but it looks like a general problem with SSL in your python installation, rather than something internal to buildozer.

I would try downloading things with the same python installation in different ways, e.g. with the requests module. Does that result in similar problems?

If this does turn out to be related to buildozer in particular, I'll reopen the issue.

@montyonthebonty
Copy link
Author

montyonthebonty commented Apr 21, 2018 via email

@patricklok
Copy link

I dont think the project owner could build any apk too!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants