Monday, May 7, 2012

virtualenvwrapper msys home

[UPDATED 2013-0207]

An indispensable piece of good Samaritan code is virtualenvwrapper by Doug Hellmann. It has some basic support for windows users using MSYS. In order to make it work though, you need to add an environmental variable to your ~/.bachrc file telling it where your MSYS files are located. If you're using msysgit, it's /c/Program\ Files/Git and user_scripts will append the "bin". And yes you will need mktemp, which you can acquire from MinGW* but you will need xz to unzip it and a compiler to build it. It is almost easier to download and install the mingw-get installer and then just add it to your mingw/msys folder by running the MinGW-MSYS bash and typing mingw-get install mktemp. Then I made a symbolic link, which in Windows looks like a copy, but is actually the same file, in my /home/bin folder which is always first in the bash $PATH.

*Since most MS Windows users have migrated to Win7 x64, I recommend using MSYS compiled by MinGW-w64 from their External binary packages (Win64 hosted) folder on SourceForge. You can simply unzip this either straight into your C:\ folder if you have admin rights, or the new and improved local virtual store which is at C:\Users\<username>\AppData\Local\VirtualStore\Program Files (x86) since MSYS is a 32-bit application. This will give you the POSIX environment and some of the MSYS GNU tools like mktemp, make and fmt, but you may need to copy over a few dll's too. The MSYS-dll is the same as msysgit's so, that's no issue. In particular make requires iconv and intl libraries.

Also you need a few other binaries to run the latest version of virtualenvwrapper. Namely make and fmt, make and the intl and iconv libraries as I said above.

No comments:

Post a Comment

Fork me on GitHub