[Python-Dev] SSL support in _socket (original) (raw)

M.-A. Lemburg mal@lemburg.com
Tue, 12 Feb 2002 15:15:12 +0100


I have a problem with SSL support in _socket and the way setup.py does the autodetection: even though SSL may be installed on the system, it seems that they changed the exposed APIs between patch level releases.

As a result, _socket compiles but the import fails on platforms which have the wrong OpenSSL version installed. setup.py then simply removes _socket from the extension list and builds Python without socket support which is a really Bad Thing since _socket without SSL support compiles just fine.

What can we do about this ?

Since auto-detection is happening rather early in setup.py it doesn't seem possible to apply some fallback scheme depending on extra knowledge for the various modules.

Perhaps we should simply let setup.py build two extensions: _socket (without SSL) and _socketssl (with SSL) ?! If the _socketssl build or import fails for some reason, Python could still pick up the _socket extension in socket.py.

Comments ?

-- Marc-Andre Lemburg CEO eGenix.com Software GmbH


Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/