Building Python 2.5 with zlib, ssl and sha256 modules required for virtualenv
For whatever reason Python 2.5 by default builds without a bunch of modules that virtualenv needs.
The first one is zlib, the recipe for it is here.
_sha256 is missing, which I fixed analogously as follows:
echo _sha256 sha256module.c >> Modules/Setup
While we are here
_sha512 module can be enabled the same way:
echo _sha512 sha512module.c >> Modules/Setup
To get ssl module working I had to uncomment the lines around it
and also uncomment
*shared* line near the top of Modules/Setup.
The following sed command will do the job:
sed -i -e '/^#SSL/,/^$/s/^#//' -e 's/^#*shared*/shared/' Modules/Setup
See also here.
Now virtualenv should work.