Skip to content

Instantly share code, notes, and snippets.

@alexsavio
Created August 3, 2015 09:13
Show Gist options
  • Save alexsavio/bf1c1ce35c8e5d96799b to your computer and use it in GitHub Desktop.
Save alexsavio/bf1c1ce35c8e5d96799b to your computer and use it in GitHub Desktop.
Install sip and PyQt in the current virtualenv.
#!/bin/bash
qmake_path=$1
if [ -z "${qmake_path}" ]; then
qmake_path=`which qmake`
fi
echo "Using qmake from ${qmake_path}. If you want to change, usage: install_pyqt_venv.sh qmake_path"
cwd=`pwd`
siproot=`find . -type d -name 'sip-*'`
pyqtroot=`find . -type d -name 'PyQt-*'`
python_ver=`python -c "import sys; print (str(sys.version_info[0])+'.'+str(sys.version_info[1]))"`
python_name="python${python_ver}"
cd ${siproot}
python configure.py -d ${VIRTUAL_ENV}/lib/${python_name}/site-packages --arch x86_64
make
make install
make clean
cd $cwd
cd ${pyqtroot}
python configure.py --destdir ${VIRTUAL_ENV}/lib/${python_name}/site-packages --qmake ${qmake_path}
make
make install
make clean
cd $cwd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment