On Sat, Jan 30, 2010 at 10:16 PM, Dr. David Kirkby <david.kir...@onetel.net > wrote:

Starting to build Sage, then finding the python builds, but finds to find the hashlib module is a bit irritating. There is is a specific test for this
in spkg-install.


-------------------------
# Make sure sufficient crypto support is available in the built python.
# This is critical.
python -c "import hashlib"

if [ $? -eq 0 -a -f "$SAGE_LOCAL/bin/python" ]; then
   echo "hashlib module imported"
   exit 0
else
   echo "hashlib module failed to import"
   exit 1
fi
-----------------------------

Faillure to build the haslib module results from a failure to find the SSL libraries. Would it not be more sensible to check for these in prereq, then exit if they are not found. It would save someone getting half a build.

This may have been true at one point, but looking at the current Python sources [0,1] it seems that Python provides native implementations of hashlib if OpenSSL is not found, so import hashlib should never fail (#7761 was an artifact that *no* distutils extensions built...). What might be more of an issue is _ssl not building [2], which may be easier to fix (especially if we don't use any parts of _ssl that gnutls doesn't support). I'm not sure why this ticket was closed without resolving that issue. OTOH, I'm doubtful we use _ssl anywhere except for the notebook, as it is all about secure sockets. Gnutls claims to have support for twisted.

Of course I'm just jumping into the issue now, so there is probably a lot of history, and pragmatic background of how stuff actually works, that I'm missing. But can anyone verify that we actually even require OpenSSL (which is the running assumption)?

- Robert


[0] http://svn.python.org/view/python/branches/release26-maint/setup.py?revision=77865&view=markup # search for _hashlib

[1] 
http://svn.python.org/view/python/branches/release26-maint/Lib/hashlib.py?view=markup

[2] http://trac.sagemath.org/sage_trac/ticket/6359#comment:13


--
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to