From 5e281e4960e21c7adf4a65afa701edbc653a618a Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Sat, 3 Aug 2013 14:19:20 -0400 Subject: Consume the OpenStack mirror by default PyPI upstream obviously breaks all the time. Like, literally, I've spent my whole life dealing with it this past week. In this test, we were avoiding the OpenStack mirror so that we could be sure to be testing that we could build the mirror when new requirements are added. However, the only time that's a concern is on a requirements repo change. Add an option --no-mirror that will trigger the "don't use OpenStack's mirrors as an upstream" behavior, and we'll add that option to the invocation on requirements changes. Change-Id: I8d01c1fbb8a5df5aa83ffba3b6489e374abef1af --- tools/integration.sh | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/tools/integration.sh b/tools/integration.sh index b32b303..2e8d5f6 100644 --- a/tools/integration.sh +++ b/tools/integration.sh @@ -17,9 +17,6 @@ function mkvenv { $venv/bin/pip install $pip } -# PROJECTS is a list of projects that we're testing -PROJECTS=$* - # BASE should be a directory with a subdir called "new" and in that # dir, there should be a git repository for every entry in PROJECTS BASE=${BASE:-/opt/stack} @@ -40,9 +37,11 @@ mkdir -p $pypidir jeepybvenv=$tmpdir/jeepyb +sudo touch $HOME/pip.log +sudo chown $USER $HOME/pip.log + rm -f ~/.pip/pip.conf ~/.pydistutils.cfg mkdir -p ~/.pip - cat < ~/.pip/pip.conf [global] log = $HOME/pip.log @@ -64,6 +63,24 @@ mirrors: output: $pypidir EOF +# Default to using pypi.openstack.org as an easy_install mirror +if [ "$1" == "--no-mirror" ] ; then + shift +else + cat < ~/.pydistutils.cfg +[easy_install] +index_url = http://pypi.openstack.org/openstack +EOF + cat < ~/.pip/pip.conf +[global] +index-url = http://pypi.openstack.org/openstack +log = $HOME/pip.log +EOF +fi + +# PROJECTS is a list of projects that we're testing +PROJECTS=$* + pbrsdistdir=$tmpdir/pbrsdist git clone $REPODIR/pbr $pbrsdistdir cd $pbrsdistdir @@ -77,6 +94,8 @@ $jeepybvenv/bin/python setup.py sdist -d $tmpdownload/pip/openstack $jeepybvenv/bin/run-mirror -b remotes/origin/master --verbose -c $tmpdir/mirror.yaml --no-download +find $pypidir + # Make pypi thing pypiurl=file://$pypidir -- cgit v1.2.1