zetaweb/www.gittip.com — pull request #471 by igetgames (2013-01-13 09:19:41+00:00)
Title: Call Python and virtualenv portably.

My setup is a Windows 7 running official Python 2.7. I'm building under a msys/mingw shell, *not* cmd.exe. Doing a `make run`, the first issue that I ran into was that CPython doesn't install a separate python2.7.exe executable. The first commit will fall back to the unversioned python executable if python2.7 isn't found.

The second issue was that CPython on Windows installs binaries and scripts to the Scripts/ directory, not bin/. So I replaced all hardcoded env/bin/ paths after detecting the platform-specific name of the bin directory.

There's a couple caveats with my approach:
* GNU make is now required. This is because I use the GNU make $(shell) function. Doing it under POSIX make is not as straightforward, but if someone really needs POSIX make to work, I'll fix it.
* On Windows, cmd.exe (or Powershell, or any non-POSIX shell) can't be used to build through the Makefile. I use POSIX `command` to detect which Python to use, and although there's a Windows equivalent, I didn't want to add more Makefile boilerplate at this time.