fabric/fabric — Issue #459: PyCrypto 2.4 woes
Author: bitprophet
Created: 2011-10-24 21:49:27+00:00
State: open
Labels: 1.x, Packaging, Support

Just wanted to document this here instead of in a commit comment...PyCrypto 2.4 does not install cleanly on any system I've tried, which is why all latest Fabric/ssh versions require Crypto <2.4.

----

```
» easy_install pycrypto 1
Searching for pycrypto
Reading http://pypi.python.org/simple/pycrypto/
Reading http://www.pycrypto.org/
Reading http://pycrypto.sourceforge.net
Reading http://www.amk.ca/python/code/crypto
Best match: pycrypto 2.4
Downloading https://ftp.dlitz.net/pub/dlitz/crypto/pycrypto/pycrypto-2.4.tar.gz
Processing pycrypto-2.4.tar.gz
Running pycrypto-2.4/setup.py -q bdist_egg --dist-dir /tmp/easy_install-LIXxta/pycrypto-2.4/egg-dist-tmp-WlEtWO
warning: PCTBuildPy: byte-compiling is disabled, skipping.
error: Setup script exited with error: src/config.h: No such file or directory
```

Same thing happens if one obtains the source code for e.g. fabric or ssh or paramiko, and runs their `setup.py develop` or `setup.py install`.

However, `pip install pycrypto` seems to work in any situation, even one where it's not using distribute behind the scenes (as I have in some virtualenvs.) So it's not clear exactly what the problem is.

I can replicate this error in clean virtualenvs under:

* Python 2.5, 2.6 and 2.7 on Mac OS X 10.7
* Python 2.6 on Ubuntu 10.04
* Python 2.7 on Ubuntu 11.04

and in a global, non-virtualenv (but otherwise mostly clean) environment under:

* Python 2.7 on Ubuntu 11.04

(so, it's also not just a virtualenv related issue.)

I'll submit this to Crypto upstream sometime soon, but for now my software does not need any of the new features in 2.4 and it's not worth the effort to figure out if we can somehow fix it on our end (which seems unlikely.)