Merge "More Python package fixes"
This commit is contained in:
commit
6ce4f8e9c4
4
stack.sh
4
stack.sh
@ -581,6 +581,10 @@ source $TOP_DIR/tools/install_prereqs.sh
|
||||
# Configure an appropriate python environment
|
||||
$TOP_DIR/tools/install_pip.sh
|
||||
|
||||
# Do the ugly hacks for borken packages and distros
|
||||
$TOP_DIR/tools/fixup_stuff.sh
|
||||
|
||||
|
||||
# System-specific preconfigure
|
||||
# ============================
|
||||
|
||||
|
43
tools/fixup_stuff.sh
Executable file
43
tools/fixup_stuff.sh
Executable file
@ -0,0 +1,43 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# **fixup_stuff.sh**
|
||||
|
||||
# fixup_stuff.sh
|
||||
#
|
||||
# All distro and package specific hacks go in here
|
||||
# - prettytable 0.7.2 permissions are 600 in the package and
|
||||
# pip 1.4 doesn't fix it (1.3 did)
|
||||
# - httplib2 0.8 permissions are 600 in the package and
|
||||
# pip 1.4 doesn't fix it (1.3 did)
|
||||
|
||||
# Keep track of the current directory
|
||||
TOOLS_DIR=$(cd $(dirname "$0") && pwd)
|
||||
TOP_DIR=`cd $TOOLS_DIR/..; pwd`
|
||||
|
||||
# Change dir to top of devstack
|
||||
cd $TOP_DIR
|
||||
|
||||
# Import common functions
|
||||
source $TOP_DIR/functions
|
||||
|
||||
FILES=$TOP_DIR/files
|
||||
|
||||
# Pre-install affected packages so we can fix the permissions
|
||||
sudo pip install prettytable
|
||||
sudo pip install httplib2
|
||||
|
||||
SITE_DIRS=$(python -c "import site; import os; print os.linesep.join(site.getsitepackages())")
|
||||
for dir in $SITE_DIRS; do
|
||||
|
||||
# Fix prettytable 0.7.2 permissions
|
||||
if [[ -r $dir/prettytable.py ]]; then
|
||||
sudo chmod +r $dir/prettytable-0.7.2*/*
|
||||
fi
|
||||
|
||||
# Fix httplib2 0.8 permissions
|
||||
httplib_dir=httplib2-0.8.egg-info
|
||||
if [[ -d $dir/$httplib_dir ]]; then
|
||||
sudo chmod +r $dir/$httplib_dir/*
|
||||
fi
|
||||
|
||||
done
|
@ -81,10 +81,12 @@ function install_get_pip() {
|
||||
}
|
||||
|
||||
function install_pip_tarball() {
|
||||
curl -O $PIP_TAR_URL
|
||||
tar xvfz pip-$INSTALL_PIP_VERSION.tar.gz
|
||||
cd pip-$INSTALL_PIP_VERSION
|
||||
sudo python setup.py install
|
||||
(cd $FILES; \
|
||||
curl -O $PIP_TAR_URL; \
|
||||
tar xvfz pip-$INSTALL_PIP_VERSION.tar.gz; \
|
||||
cd pip-$INSTALL_PIP_VERSION; \
|
||||
sudo python setup.py install; \
|
||||
)
|
||||
}
|
||||
|
||||
# Show starting versions
|
||||
|
Loading…
Reference in New Issue
Block a user