This is a follow-on to comments in https://review.openstack.org/156356
and https://review.openstack.org/#/c/151513/
* Remove work-around for /var/cache/pip
* Remove WHEELHOUSE setting in tools/build_wheels.sh and use the pip
default directory '<cwd>/wheelhouse'
* Remove bogus MySQL-python install
* Removed unused bits and clean up pip commands in from tools/build_venvs.sh
Closes-Bug: #1423720
Change-Id: I0283b0dff9146b1b63bd821358505a93566270c6
| ... | ... |
@@ -677,14 +677,8 @@ source $TOP_DIR/tools/fixup_stuff.sh |
| 677 | 677 |
# Virtual Environment |
| 678 | 678 |
# ------------------- |
| 679 | 679 |
|
| 680 |
-# Temporary hack for testing |
|
| 681 |
-# This belongs in d-g functions.sh setup_host() or devstack-vm-gate.sh |
|
| 682 |
-if [[ -d /var/cache/pip ]]; then |
|
| 683 |
- sudo chown -R $STACK_USER:$STACK_USER /var/cache/pip |
|
| 684 |
-fi |
|
| 685 |
- |
|
| 686 | 680 |
# Pre-build some problematic wheels |
| 687 |
-if [[ ! -d ${WHEELHOUSE:-} ]]; then
|
|
| 681 |
+if [[ -n ${WHEELHOUSE:-} && ! -d ${WHEELHOUSE:-} ]]; then
|
|
| 688 | 682 |
source $TOP_DIR/tools/build_wheels.sh |
| 689 | 683 |
fi |
| 690 | 684 |
|
| ... | ... |
@@ -34,26 +34,13 @@ if [[ -z "$TOP_DIR" ]]; then |
| 34 | 34 |
|
| 35 | 35 |
source $TOP_DIR/stackrc |
| 36 | 36 |
|
| 37 |
- trap err_trap ERR |
|
| 38 |
- |
|
| 39 | 37 |
fi |
| 40 | 38 |
|
| 41 |
-# Exit on any errors so that errors don't compound |
|
| 42 |
-function err_trap {
|
|
| 43 |
- local r=$? |
|
| 44 |
- set +o xtrace |
|
| 45 |
- |
|
| 46 |
- rm -rf $TMP_VENV_PATH |
|
| 47 |
- |
|
| 48 |
- exit $r |
|
| 49 |
-} |
|
| 50 |
- |
|
| 51 | 39 |
# Build new venv |
| 52 | 40 |
virtualenv $VENV_DEST |
| 53 | 41 |
|
| 54 | 42 |
# Install modern pip |
| 55 |
-$VENV_DEST/bin/pip install -U pip |
|
| 43 |
+PIP_VIRTUAL_ENV=$VENV_DEST pip_install -U pip |
|
| 56 | 44 |
|
| 57 |
-for pkg in ${MORE_PACKAGES}; do
|
|
| 58 |
- pip_install_venv $VENV_DEST $pkg |
|
| 59 |
-done |
|
| 45 |
+# Install additional packages |
|
| 46 |
+PIP_VIRTUAL_ENV=$VENV_DEST pip_install ${MORE_PACKAGES}
|
| ... | ... |
@@ -36,10 +36,6 @@ fi |
| 36 | 36 |
# Get additional packages to build |
| 37 | 37 |
MORE_PACKAGES="$@" |
| 38 | 38 |
|
| 39 |
-# Set a fall-back default, assume that since this script is being called |
|
| 40 |
-# package builds are to happen even if WHEELHOUSE is not configured |
|
| 41 |
-export WHEELHOUSE=${WHEELHOUSE:-.wheelhouse}
|
|
| 42 |
- |
|
| 43 | 39 |
# Exit on any errors so that errors don't compound |
| 44 | 40 |
function err_trap {
|
| 45 | 41 |
local r=$? |