Actually, the _sha module is provided by shamodule.c and _md5 is provided by md5module.c and md5.c, and both will be built only when your Python is not compiled with OpenSSL by default.
Details can be found in setup.pythe Python source archive.
if COMPILED_WITH_PYDEBUG or not have_usable_openssl:
exts.append( Extension('_sha', ['shamodule.c']) )
exts.append( Extension('_md5',
sources = ['md5module.c', 'md5.c'],
depends = ['md5.h']) )
Python Openssl, OpenSSL.
, , Python OpenSSL , pydebug .
Python Source:
./configure --with-pydebug
make
:
>>> import _sha
[38571 refs]
>>> _sha.__file__
'/home/senthil/python/release27-maint/build/lib.linux-i686-2.7-pydebug/_sha.so'
[38573 refs]