The check for virtualenv fails, I am not a shell script wizard, but I think it should be "if [ ! -x `which virtualenv` ];" (added exclamation mark)
It also seems to miss the part needed for swig.
And while I haven't tried that part of the script, I am surprised that PyQt built and installed without any problem. I had to modify all the makefiles, as the include directories pointed to the system dirs instead of the virtualenv ones, crashing the make & make install dance.