diff options
author | kali <kali@leap.se> | 2012-09-07 05:21:30 +0900 |
---|---|---|
committer | kali <kali@leap.se> | 2012-09-07 05:31:50 +0900 |
commit | 3fa754c39bcdea355a4ec6b0ddfaeead2040a86a (patch) | |
tree | 78004630c5eaa909c488d88ac68a46e999bb242d /pkg | |
parent | 0932d79369fe381c20f4b8f0260a1cd850d979a7 (diff) | |
parent | 5006fda226a3fa6afda231df8aa733477bd4e420 (diff) |
Merge branch 'feature/support-2.6' into develop
Closes #390.
Run tox -v to run testsuite against 2.6 and 2.7.
Tests happily passing on 2.6 :)
Diffstat (limited to 'pkg')
-rwxr-xr-x | pkg/install_pyqt.sh | 10 | ||||
-rwxr-xr-x | pkg/postmkvenv.sh | 19 |
2 files changed, 29 insertions, 0 deletions
diff --git a/pkg/install_pyqt.sh b/pkg/install_pyqt.sh new file mode 100755 index 00000000..d6739816 --- /dev/null +++ b/pkg/install_pyqt.sh @@ -0,0 +1,10 @@ +#!/bin/sh +pip install sip # fails +cd build/sip +python configure.py +make && make install +cd ../.. +pip install PyQt # fails +cd build/PyQt +python configure.py +make && make install diff --git a/pkg/postmkvenv.sh b/pkg/postmkvenv.sh new file mode 100755 index 00000000..99e364c0 --- /dev/null +++ b/pkg/postmkvenv.sh @@ -0,0 +1,19 @@ +#!/bin/bash +# This hook is run after a new virtualenv is activated. +# ~/.virtualenvs/postmkvirtualenv + +# Symlinks PyQt4 from global installation into virtualenv site-packages + +LIBS=( PyQt4 sip.so ) + +PYTHON_VERSION=python$(python -c "import sys; print (str(sys.version_info[0])+'.'+str(sys.version_info[1]))") +VAR=( $(which -a $PYTHON_VERSION) ) + +GET_PYTHON_LIB_CMD="from distutils.sysconfig import get_python_lib; print (get_python_lib())" +LIB_VIRTUALENV_PATH=$(python -c "$GET_PYTHON_LIB_CMD") +LIB_SYSTEM_PATH=$(${VAR[-1]} -c "$GET_PYTHON_LIB_CMD") + +for LIB in ${LIBS[@]} +do + ln -s $LIB_SYSTEM_PATH/$LIB $LIB_VIRTUALENV_PATH/$LIB +done |