classification
Title: sha modules & Modules/Setup.dist
Type: Stage:
Components: Installation Versions: Python 2.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: gregory.p.smith Nosy List: gregory.p.smith, rwgk
Priority: low Keywords:

Created on 2008-06-23 19:38 by rwgk, last changed 2008-07-07 04:55 by gregory.p.smith. This issue is now closed.

Messages (2)
msg68644 - (view) Author: Ralf W. Grosse-Kunstleve (rwgk) Date: 2008-06-23 19:38
It would be very useful to add two lines to Modules/Setup.dist:

Index: Modules/Setup.dist
===================================================================
--- Modules/Setup.dist  (revision 64489)
+++ Modules/Setup.dist  (working copy)
@@ -249,6 +249,8 @@
 # The _sha module implements the SHA checksum algorithm.
 # (NIST's Secure Hash Algorithm.)
 #_sha shamodule.c
+#_sha256 sha256module.c
+#_sha512 sha512module.c


 # SGI IRIX specific modules -- off by default.


Background:

- Python built on machine A and distributed to end-users.
  Machine A happens to have the OpenSSL libraries.

- End-user runs our package incl. the pre-built Python on
  machine B, which happens not to have the OpenSSL libraries,
  or an incompatible version.

- hashlib imports _hashlib, which fails because of the
  OpenSSL problem.

- hashlib tries to fall back to generic sha and md5 modules.
  I had _sha and md5 enabled in Modules/Setup.dist, but
  didn't know Python 2.5 needs more.

I found this out the hard way. It would be helpful to at least
have the extra two comments as suggested above. I think it would
be even better to not comment out the md5 and sha modules in
the original Python distribution since it just adds about 200k
of .o files (Linux). That's very cheap compared to the loss
in time if people have to figure out why import hashlib is
failing and how to work around the problem.
msg69374 - (view) Author: Gregory P. Smith (gregory.p.smith) * (Python committer) Date: 2008-07-07 04:55
seems harmless enough.  done in trunk r64769.
History
Date User Action Args
2008-07-07 04:55:09gregory.p.smithsetstatus: open -> closed
nosy: + gregory.p.smith
messages: + msg69374
priority: low
assignee: gregory.p.smith
resolution: fixed
2008-06-23 19:38:28rwgkcreate