commands

  • install xcode
  • install the Command Line Tools (open Xcode > Preferences > Downloads)
  • install Qt libraries (qt-opensource-mac-x64-clang-5.2.1.dmg)
  • install python 3.4
  • create a virtual env (i.e. ~/.env/ariane_mail)
  • unzip and compile SIP and PyQt

Commands

cd /var/tmp
cp ~/Downloads/PyQt-gpl-5.5.1.tar.gz .
cp ~/Downloads/sip-4.17.tar.gz .
tar xvf PyQt-gpl-5.5.1.tar.gz
tar xvf sip-4.17.tar.gz
cd sip-4.17
python3 configure.py -d ~/pyqt/lib/python3.4/site-packages --arch x86_64
source ~/pyqt/bin/activate
make
make install
cd ..

vi /Users/tim/Qt5.2.1/5.2.1/clang_64/mkspecs/qdevice.pri And make file look like

    !host_build:QMAKE_MAC_SDK = macosx
    GCC_MACHINE_DUMP = x86_64-apple-darwin12.5.0

And now Build QT

cd PyQt-5.5.1
python3 configure.py --destdir ~/pyqt/lib/python3.4/site-packages --qmake ~/Qt5.2.1/5.2.1/clang_64/bin/qmake
make
make install 

Test it all worked

~/.env/ariane_mail/bin/python -c "import PyQt5"