summaryrefslogtreecommitdiff
path: root/pkg/postmkvenv.sh
diff options
context:
space:
mode:
authorkali <kali@leap.se>2013-01-02 18:06:13 +0900
committerkali <kali@leap.se>2013-01-02 18:09:25 +0900
commit4ad663b935fa1845d426dde99a8272942b620e11 (patch)
tree28aacf15e8a2f2d5ee3a4840641776c54f2ae63d /pkg/postmkvenv.sh
parent5a99186cbc1b4fc8dbd317b56f3a620b2a9f79a4 (diff)
initial OSX packaging
Diffstat (limited to 'pkg/postmkvenv.sh')
-rwxr-xr-xpkg/postmkvenv.sh17
1 files changed, 16 insertions, 1 deletions
diff --git a/pkg/postmkvenv.sh b/pkg/postmkvenv.sh
index efdbc2fb..593b11da 100755
--- a/pkg/postmkvenv.sh
+++ b/pkg/postmkvenv.sh
@@ -8,6 +8,14 @@
# script fails in ubuntu, with path: /usr/lib/pymodules/python2.7/PyQt4
# use import PyQt4; PyQt4.__path__ instead
+platform='unknown'
+unamestr=`uname`
+if [[ "$unamestr" == 'Linux' ]]; then
+ platform='linux'
+elif [[ "$unamestr" == 'Darwin' ]]; then
+ platform='darwin'
+fi
+
LIBS=( PyQt4 sip.so )
PYTHON_VERSION=python$(python -c "import sys; print (str(sys.version_info[0])+'.'+str(sys.version_info[1]))")
@@ -15,7 +23,14 @@ 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")
+
+if [[ $platform == 'linux' ]]; then
+ LIB_SYSTEM_PATH=$(${VAR[-1]} -c "$GET_PYTHON_LIB_CMD")
+elif [[ $platform == 'darwin' ]]; then
+ LIB_SYSTEM_PATH=$(/opt/local/bin/python2.6 -c "$GET_PYTHON_LIB_CMD")
+else
+ echo "unsupported platform; not doing symlinks"
+fi
for LIB in ${LIBS[@]}
do