Revert "warm pip wheel cache during image build"

Turns out we can't do this without dirtying our images by
preinstalling all the libraries/headers our requirements want to
link against. We should revisit the wheel mirror solution which has
already been written as a saner solution.

This reverts commit 1503ef3278.

Change-Id: I69ea73b6eb4b620f1ac77467ee3784ec3c813ee2
This commit is contained in:
Jeremy Stanley 2015-11-04 20:39:11 +00:00
parent d510a53ef7
commit 23da1ea04a
1 changed files with 0 additions and 48 deletions

View File

@ -1,48 +0,0 @@
#!/bin/bash
# Copyright (C) 2015 Hewlett-Packard Development Company, L.P.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
#
# See the License for the specific language governing permissions and
# limitations under the License.
# dib-lint: disable=setpipefail
if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then
set -x
fi
set -eu
REQUIREMENTS_DIR=/opt/git/openstack/requirements
BUILDPIP_VENV=$(mktemp -d)
UC_FILE=$BUILDPIP_VENV/uc.txt
# Setup venv and install all of the global requirements. This will
# create a warm pip cache which can be used by devstack later.
sudo virtualenv $BUILDPIP_VENV
# Loop through all possible branches
BRANCHES=`git --git-dir=$REQUIREMENTS_DIR/.git branch -r | grep '^ origin/[^H]'`
for BRANCH in $BRANCHES ; do
git --git-dir=$REQUIREMENTS_DIR/.git show $BRANCH:upper-constraints.txt \
2>/dev/null > $UC_FILE || true
if [[ -f $UC_FILE ]]; then
# install all the upper-constraints
sudo -H $BUILDPIP_VENV/bin/pip install -r $UC_FILE
# remove the file at the end to ensure that we don't use an
# old one for this branch
rm -f $UC_FILE
fi
done
# Delete the venv after the script, we don't care about the venv, just
# the cache artifacts left around.
sudo rm -rf $BUILDPIP_VENV