install SSL to python dist help!

94 views
Skip to first unread message

lirre

unread,
Feb 11, 2014, 10:36:34 AM2/11/14
to python-...@googlegroups.com
Hi.

i wrote this in Kivy users group:

https://groups.google.com/forum/#!topic/kivy-users/1NKjWTb5_mk

But I think this is a more relevant place to post the issue I have.

So I want to add SSL to python dist in python-for-android. Can anyone help me

I have tried editing setup.dist in python and python-install folder of build: (uncommented lines)

[code]
204:# Socket module helper for SSL support; you must comment out the other
205:# socket line above, and possibly edit the SSL variable:
206:SSL=/usr/lib/ssl
207:_ssl _ssl.c \
208:    -DUSE_SSL -I$(SSL)/include -I$(SSL)/include/openssl \
209:    -L$(SSL)/lib -lssl -lcrypto</pre>
[/code]

but smtplib can still not find SSL. I get a runtime error when I run my apk

Can anyone help me please?

lirre

unread,
Feb 11, 2014, 11:03:02 AM2/11/14
to python-...@googlegroups.com
Sorry I mean python and hostpython in python-for-android/build directory.

I have also tried to supply openssl to ./build command along with setup.dist changes. I get this error with adb logcat:

[code]
D/dalvikvm( 2470): GC_CONCURRENT freed 60K, 23% free 5828K/7536K, paused 3ms+25
s, total 78ms
I/python  ( 3552):  Exception in thread Thread-1:
I/python  ( 3552):  Traceback (most recent call last):
I/python  ( 3552):    File "/home/kivy/android/python-for-android/build/python-
nstall/lib/python2.7/threading.py", line 552, in __bootstrap_inner
I/python  ( 3552):    File "/home/kivy/android/python-for-android/build/python-
nstall/lib/python2.7/threading.py", line 505, in run
I/python  ( 3552):    File "/home/kivy/android/proto1/MailScreen.py", line 199,
in send_mail
I/python  ( 3552):    File "/home/kivy/android/proto1/entryFileOptions.py", lin
 222, in send_mail
I/python  ( 3552):    File "/home/kivy/android/python-for-android/build/python-
nstall/lib/python2.7/smtplib.py", line 630, in starttls
I/python  ( 3552):  RuntimeError: No SSL support included in this Python
[/code]

but python-install does have ssl in the python-for-android/build/python-install/lib/python2.7/ folder

What is really the difference between python/, hostpython/, and python-install folders in build/?
I am very confused, why is it not in my apk if it is in python dist?
How to add ssl?

Sean Watkins

unread,
Oct 1, 2015, 5:09:50 AM10/1/15
to Python For Android
Did you include the _ssl.so and related libraries into the application?

I had a similar issue because my python instance couldn't find the SSL libraries
Reply all
Reply to author
Forward
0 new messages