- Install a known working recent version of pip (cherry-picked from
62d1d698a0c1459)
- Don't install boto from pip let use the default from ubuntu or the
euac2ools will fails.
- Don't install netaddr from the packages let the pip do its job without
being confused.
- Skip excercises that fails on grizzly.
Change-Id: I27df3787b5b90621ea66e4cc9763365b4579e3ca
| ... | ... |
@@ -15,7 +15,7 @@ source $TOP_DIR/stackrc |
| 15 | 15 |
|
| 16 | 16 |
# comma separated list of script basenames to skip |
| 17 | 17 |
# to refrain from exercising euca.sh use SKIP_EXERCISES=euca |
| 18 |
-SKIP_EXERCISES=${SKIP_EXERCISES:-""}
|
|
| 18 |
+SKIP_EXERCISES=${SKIP_EXERCISES:-"boot_from_volume,bundle,euca"}
|
|
| 19 | 19 |
|
| 20 | 20 |
# comma separated list of script basenames to run |
| 21 | 21 |
# to run only euca.sh use RUN_EXERCISES=euca |
| ... | ... |
@@ -30,7 +30,6 @@ python-greenlet |
| 30 | 30 |
python-libvirt |
| 31 | 31 |
python-libxml2 |
| 32 | 32 |
python-routes |
| 33 |
-python-netaddr |
|
| 34 | 33 |
python-numpy # used by websockify for spice console |
| 35 | 34 |
python-pastedeploy |
| 36 | 35 |
python-eventlet |
| ... | ... |
@@ -41,7 +40,6 @@ python-sqlalchemy |
| 41 | 41 |
python-suds |
| 42 | 42 |
python-lockfile |
| 43 | 43 |
python-m2crypto |
| 44 |
-python-boto |
|
| 45 | 44 |
python-kombu |
| 46 | 45 |
python-feedparser |
| 47 | 46 |
python-iso8601 |
| ... | ... |
@@ -22,7 +22,6 @@ python-PasteDeploy |
| 22 | 22 |
python-Routes |
| 23 | 23 |
python-SQLAlchemy |
| 24 | 24 |
python-Tempita |
| 25 |
-python-boto |
|
| 26 | 25 |
python-carrot |
| 27 | 26 |
python-cheetah |
| 28 | 27 |
python-eventlet |
| ... | ... |
@@ -34,7 +33,6 @@ python-lockfile |
| 34 | 34 |
python-lxml # needed for glance which is needed for nova --- this shouldn't be here |
| 35 | 35 |
python-mox |
| 36 | 36 |
python-mysql |
| 37 |
-python-netaddr |
|
| 38 | 37 |
python-numpy # needed by websockify for spice console |
| 39 | 38 |
python-paramiko |
| 40 | 39 |
python-python-gflags |
| ... | ... |
@@ -6,7 +6,6 @@ mod_wsgi # NOPRIME |
| 6 | 6 |
pylint |
| 7 | 7 |
python-anyjson |
| 8 | 8 |
python-BeautifulSoup |
| 9 |
-python-boto |
|
| 10 | 9 |
python-coverage |
| 11 | 10 |
python-dateutil |
| 12 | 11 |
python-eventlet |
| ... | ... |
@@ -15,7 +14,6 @@ python-httplib2 |
| 15 | 15 |
python-kombu |
| 16 | 16 |
python-migrate |
| 17 | 17 |
python-mox |
| 18 |
-python-netaddr |
|
| 19 | 18 |
python-nose |
| 20 | 19 |
python-paste |
| 21 | 20 |
python-paste-deploy |
| ... | ... |
@@ -15,7 +15,6 @@ numpy # needed by websockify for spice console |
| 15 | 15 |
m2crypto |
| 16 | 16 |
mysql-server # NOPRIME |
| 17 | 17 |
parted |
| 18 |
-python-boto |
|
| 19 | 18 |
python-carrot |
| 20 | 19 |
python-cheetah |
| 21 | 20 |
python-eventlet |
| ... | ... |
@@ -27,7 +26,6 @@ python-kombu |
| 27 | 27 |
python-lockfile |
| 28 | 28 |
python-migrate |
| 29 | 29 |
python-mox |
| 30 |
-python-netaddr |
|
| 31 | 30 |
python-paramiko |
| 32 | 31 |
python-paste |
| 33 | 32 |
python-paste-deploy |
| ... | ... |
@@ -533,6 +533,9 @@ set -o xtrace |
| 533 | 533 |
echo_summary "Installing package prerequisites" |
| 534 | 534 |
source $TOP_DIR/tools/install_prereqs.sh |
| 535 | 535 |
|
| 536 |
+# Configure an appropriate python environment |
|
| 537 |
+$TOP_DIR/tools/install_pip.sh |
|
| 538 |
+ |
|
| 536 | 539 |
install_rpc_backend |
| 537 | 540 |
|
| 538 | 541 |
if is_service_enabled $DATABASE_BACKENDS; then |
| 539 | 542 |
new file mode 100755 |
| ... | ... |
@@ -0,0 +1,118 @@ |
| 0 |
+#!/usr/bin/env bash |
|
| 1 |
+ |
|
| 2 |
+# **install_pip.sh** |
|
| 3 |
+ |
|
| 4 |
+# install_pip.sh [--pip-version <version>] [--use-get-pip] [--setuptools] [--force] |
|
| 5 |
+# |
|
| 6 |
+# Update pip and friends to a known common version |
|
| 7 |
+ |
|
| 8 |
+# Assumptions: |
|
| 9 |
+# - currently we try to leave the system setuptools alone, install |
|
| 10 |
+# the system package if it is not already present |
|
| 11 |
+# - update pip to $INSTALL_PIP_VERSION |
|
| 12 |
+ |
|
| 13 |
+# Keep track of the current directory |
|
| 14 |
+TOOLS_DIR=$(cd $(dirname "$0") && pwd) |
|
| 15 |
+TOP_DIR=`cd $TOOLS_DIR/..; pwd` |
|
| 16 |
+ |
|
| 17 |
+# Change dir to top of devstack |
|
| 18 |
+cd $TOP_DIR |
|
| 19 |
+ |
|
| 20 |
+# Import common functions |
|
| 21 |
+source $TOP_DIR/functions |
|
| 22 |
+ |
|
| 23 |
+FILES=$TOP_DIR/files |
|
| 24 |
+ |
|
| 25 |
+# Handle arguments |
|
| 26 |
+ |
|
| 27 |
+INSTALL_PIP_VERSION=${INSTALL_PIP_VERSION:-"1.4"}
|
|
| 28 |
+while [[ -n "$1" ]]; do |
|
| 29 |
+ case $1 in |
|
| 30 |
+ --force) |
|
| 31 |
+ FORCE=1 |
|
| 32 |
+ ;; |
|
| 33 |
+ --pip-version) |
|
| 34 |
+ INSTALL_PIP_VERSION="$2" |
|
| 35 |
+ shift |
|
| 36 |
+ ;; |
|
| 37 |
+ --setuptools) |
|
| 38 |
+ SETUPTOOLS=1 |
|
| 39 |
+ ;; |
|
| 40 |
+ --use-get-pip) |
|
| 41 |
+ USE_GET_PIP=1; |
|
| 42 |
+ ;; |
|
| 43 |
+ esac |
|
| 44 |
+ shift |
|
| 45 |
+done |
|
| 46 |
+ |
|
| 47 |
+SETUPTOOLS_EZ_SETUP_URL=https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py |
|
| 48 |
+PIP_GET_PIP_URL=https://raw.github.com/pypa/pip/master/contrib/get-pip.py |
|
| 49 |
+PIP_TAR_URL=https://pypi.python.org/packages/source/p/pip/pip-$INSTALL_PIP_VERSION.tar.gz |
|
| 50 |
+ |
|
| 51 |
+GetDistro |
|
| 52 |
+echo "Distro: $DISTRO" |
|
| 53 |
+ |
|
| 54 |
+function get_versions() {
|
|
| 55 |
+ PIP=$(which pip 2>/dev/null || which pip-python 2>/dev/null) |
|
| 56 |
+ if [[ -n $PIP ]]; then |
|
| 57 |
+ DISTRIBUTE_VERSION=$($PIP freeze | grep 'distribute==') |
|
| 58 |
+ SETUPTOOLS_VERSION=$($PIP freeze | grep 'setuptools==') |
|
| 59 |
+ PIP_VERSION=$($PIP --version | awk '{ print $2}')
|
|
| 60 |
+ echo "pip: $PIP_VERSION setuptools: $SETUPTOOLS_VERSION distribute: $DISTRIBUTE_VERSION" |
|
| 61 |
+ fi |
|
| 62 |
+} |
|
| 63 |
+ |
|
| 64 |
+function setuptools_ez_setup() {
|
|
| 65 |
+ if [[ ! -r $FILES/ez_setup.py ]]; then |
|
| 66 |
+ (cd $FILES; \ |
|
| 67 |
+ curl -OR $SETUPTOOLS_EZ_SETUP_URL; \ |
|
| 68 |
+ ) |
|
| 69 |
+ fi |
|
| 70 |
+ sudo python $FILES/ez_setup.py |
|
| 71 |
+} |
|
| 72 |
+ |
|
| 73 |
+function install_get_pip() {
|
|
| 74 |
+ if [[ ! -r $FILES/get-pip.py ]]; then |
|
| 75 |
+ (cd $FILES; \ |
|
| 76 |
+ curl $PIP_GET_PIP_URL; \ |
|
| 77 |
+ ) |
|
| 78 |
+ fi |
|
| 79 |
+ sudo python $FILES/get-pip.py |
|
| 80 |
+} |
|
| 81 |
+ |
|
| 82 |
+function install_pip_tarball() {
|
|
| 83 |
+ curl -O $PIP_TAR_URL |
|
| 84 |
+ tar xvfz pip-$INSTALL_PIP_VERSION.tar.gz |
|
| 85 |
+ cd pip-$INSTALL_PIP_VERSION |
|
| 86 |
+ sudo python setup.py install |
|
| 87 |
+} |
|
| 88 |
+ |
|
| 89 |
+# Show starting versions |
|
| 90 |
+get_versions |
|
| 91 |
+ |
|
| 92 |
+# Do setuptools |
|
| 93 |
+if [[ -n "$SETUPTOOLS" ]]; then |
|
| 94 |
+ # We want it from source |
|
| 95 |
+ uninstall_package python-setuptools |
|
| 96 |
+ setuptools_ez_setup |
|
| 97 |
+else |
|
| 98 |
+ # See about installing the distro setuptools |
|
| 99 |
+ if ! python -c "import setuptools"; then |
|
| 100 |
+ install_package python-setuptools |
|
| 101 |
+ fi |
|
| 102 |
+fi |
|
| 103 |
+ |
|
| 104 |
+# Do pip |
|
| 105 |
+if [[ -z $PIP || "$PIP_VERSION" != "$INSTALL_PIP_VERSION" || -n $FORCE ]]; then |
|
| 106 |
+ |
|
| 107 |
+ # Eradicate any and all system packages |
|
| 108 |
+ uninstall_package python-pip |
|
| 109 |
+ |
|
| 110 |
+ if [[ -n "$USE_GET_PIP" ]]; then |
|
| 111 |
+ install_get_pip |
|
| 112 |
+ else |
|
| 113 |
+ install_pip_tarball |
|
| 114 |
+ fi |
|
| 115 |
+ |
|
| 116 |
+ get_versions |
|
| 117 |
+fi |