'Installing M2Crypto inside of virtualenv without installing swig to the system

I am working in a virtual environment and when I pip install M2Crypto on a machine that happens to have swig installed (system-wide) then it installs fine. I need to get M2Crypto to install when swig may not be available system wide though. Is there a way to install M2Crypto in the virtual environment using a local swig install?



Solution 1:[1]

So in the end I got this to work by letting buildout handle downloading and installing swig and M2Crypto and then just moving the built M2Crypto and EGG-INFO directories from where buildout put them to where virtualenv wanted them...this might not be the optimal solution, but hey, it worked.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 vik