summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Alejandro <ivanalejandro0@gmail.com>2015-04-22 15:40:49 -0300
committerKali Kaneko <kali@leap.se>2015-04-24 16:35:33 -0400
commit649b869f76730da78fcd40dacf8da45166ebd750 (patch)
tree04849dc594488c0f5b842c38da0344e6b1a05747
parentb2623678d53c27707ea38d222e3dfee0f171ed35 (diff)
[bug] support /usr/lib64 python path for symlinks
On 64bit Fedora/RHEL systems the python path is /usr/lib64 instead of /usr/lib like on Ubuntu systems. This fix allows those users to use the bootstrap_develop.sh script.
-rw-r--r--changes/bug_lib64-path-fix-for-bootstrap-script1
-rwxr-xr-xpkg/postmkvenv.sh8
2 files changed, 6 insertions, 3 deletions
diff --git a/changes/bug_lib64-path-fix-for-bootstrap-script b/changes/bug_lib64-path-fix-for-bootstrap-script
new file mode 100644
index 00000000..4e4400c1
--- /dev/null
+++ b/changes/bug_lib64-path-fix-for-bootstrap-script
@@ -0,0 +1 @@
+- Bugfix: Fix the bootstrap script for developers so it works on Fedora/RHEL systems where there is /usr/lib64 for python libs.
diff --git a/pkg/postmkvenv.sh b/pkg/postmkvenv.sh
index 7b06fa6d..015464d3 100755
--- a/pkg/postmkvenv.sh
+++ b/pkg/postmkvenv.sh
@@ -21,16 +21,18 @@ LIBS=( PySide pysideuic )
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())"
+# this takes care of the /usr/lib vs /usr/lib64 differences between platforms
+GET_PYTHON_LIB_CMD="from distutils.sysconfig import get_python_lib; print (get_python_lib(plat_specific=True))"
+
LIB_VIRTUALENV_PATH=$(python -c "$GET_PYTHON_LIB_CMD")
if [[ $platform == 'linux' ]]; then
LIB_SYSTEM_PATH=$(${VAR[-1]} -c "$GET_PYTHON_LIB_CMD")
elif [[ $platform == 'darwin' ]]; then
ORIGINAL_PATH=$PATH
- #change first colon of path to | because path substitution is greedy
+ # change first colon of path to | because path substitution is greedy
PATH=${PATH/:/|}
- #remove everything up to | from path
+ # remove everything up to | from path
PATH=${PATH/*|/}
LIB_SYSTEM_PATH=$(python -c "$GET_PYTHON_LIB_CMD")
PATH=$ORIGINAL_PATH