2017-08-13 03:24:00 +02:00
|
|
|
from pythonforandroid.toolchain import Recipe
|
|
|
|
|
|
|
|
# if android app crashes on start with "ImportError: No module named websocket"
|
|
|
|
#
|
|
|
|
# copy the 'websocket' directory into your app directory to force inclusion.
|
|
|
|
#
|
|
|
|
# see my example at https://github.com/debauchery1st/example_kivy_websocket-recipe
|
2019-03-30 21:58:45 +01:00
|
|
|
#
|
|
|
|
# If you see errors relating to 'SSL not available' ensure you have the package backports.ssl-match-hostname
|
|
|
|
# in the buildozer requirements, since Kivy targets python 2.7.x
|
|
|
|
#
|
|
|
|
# You may also need sslopt={"cert_reqs": ssl.CERT_NONE} as a parameter to ws.run_forever() if you get an error relating to
|
|
|
|
# host verification
|
2017-08-13 03:24:00 +02:00
|
|
|
|
|
|
|
|
|
|
|
class WebSocketClient(Recipe):
|
|
|
|
|
2019-03-30 21:58:45 +01:00
|
|
|
url = 'https://github.com/websocket-client/websocket-client/archive/v{version}.tar.gz'
|
2017-08-13 03:24:00 +02:00
|
|
|
|
|
|
|
version = '0.40.0'
|
|
|
|
|
|
|
|
# patches = ['websocket.patch'] # Paths relative to the recipe dir
|
|
|
|
|
2019-03-30 21:58:45 +01:00
|
|
|
depends = ['android', 'pyjnius', 'cryptography', 'pyasn1', 'pyopenssl']
|
|
|
|
|
2017-08-13 03:24:00 +02:00
|
|
|
|
|
|
|
recipe = WebSocketClient()
|