[Python-Dev] SSL detection problem

Martin v. Loewis martin@mira.cs.tu-berlin.de
Thu, 18 Jan 2001 11:39:30 +0100


The distutils-based configuration fails to build on my system (SuSE
7.0) with the error

/usr/src/python/Modules/socketmodule.c:159: rsa.h: Datei oder Verzeichnis nicht
gefunden
/usr/src/python/Modules/socketmodule.c:160: crypto.h: Datei oder Verzeichnis nicht gefunden
/usr/src/python/Modules/socketmodule.c:161: x509.h: Datei oder Verzeichnis nicht gefunden
/usr/src/python/Modules/socketmodule.c:162: pem.h: Datei oder Verzeichnis nicht
gefunden
/usr/src/python/Modules/socketmodule.c:163: ssl.h: Datei oder Verzeichnis nicht
gefunden                                                                       

The problem is that these header files are in /usr/include/openssl,
which is not in the standard include search path.

So the obvious request is: could this be fixed? I guess when setup.py
finds the openssl library, it should also try to find ssl.h, in some
obvious locations.

The not-so-obvious question: How can one work-around such a problem
with the new setup scheme? In the old scheme, I could have chosen to
either provide the right -I option in Modules/Setup, to disable SSL
support, or to disable the _socket module altogether. How can I
achieve either configuration with the new scheme?

Regards,
Martin

P.S. As a quick hack, I added a custom include_dirs parameter to the
SSL extension.