SIP needs to be built prior to building PyQt.
Download SIP from here
Maya 2012 uses Qt 4.7.1.
Download it from here
Download PyQt from here
First step is to build qt from source. Extract the tarball and CD in to the directory
While running configure, if you get the following error
Basic XLib functionality test failed!
You might need to modify the include and library search paths by editing
QMAKE_INCDIR_X11 and QMAKE_LIBDIR_X11 in /home/anoop/apps/sources/qt-everywhere-opensource-src-4.7.1 /mkspecs/linux-g++-64.
install teh libXext development package. I used zypper to install the package from the web
zypper install xorg-x11-libXext-devel
executing the configure after the installation gave the following error
cannot find -lXrender
this was happening because configure couldn’t find libXrender.so. This can be fixed by creating a symlink to libXrender.so.1 in the /usr/lib64 directory
ln -s /usr/lib64/libXrender.so.1 /usr/lib64/libXrender.so
After successful configuration run the following to install Qt to /usr/local/Trolltech/Qt-4.7.1 directory
Extract the SIP zip archive to /home/username/SIP
After setting the variables, run the following
Extract the archive to /home/username/PyQt-x11-gpl-4.7.4
/usr/autodesk/maya2012/bin/mayapy configure.py -q /usr/local/Trolltech/Qt-4.7.1/bin/qmake