From 639c7e707804b797da8b46d09ed7c55768809b56 Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Sat, 10 Aug 2013 18:23:45 -0300 Subject: [PATCH] Add support for per-distro wheel mirrors Because the wheel format does not do fine-grained enough selection on things like the high likelihood that Ubuntu precise and Ubuntu raring might have different underlying C libraries for python 2.7, we need to put our built wheels into a structure that allows them to be used safely. lsb_release -r -i is used because Centos lists lsb_release -c as "Final" which is not particularly helpful. This will wind up with identifying strings like Ubuntu-12.04 and Centos-6.4 - which should be good enough for what we need. The same logic is used in run-mirror to produce the subdir. Change-Id: I84c0ef57cf2e5e8c2cbfe2b18512b29228b0838f --- modules/jenkins/files/slave_scripts/select-mirror.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/modules/jenkins/files/slave_scripts/select-mirror.sh b/modules/jenkins/files/slave_scripts/select-mirror.sh index 7825490b09..d2d761d684 100755 --- a/modules/jenkins/files/slave_scripts/select-mirror.sh +++ b/modules/jenkins/files/slave_scripts/select-mirror.sh @@ -45,20 +45,26 @@ then # For OpenStack projects, use the pypi.openstack.org mirror exclusively elif [ "$org" == "openstack" ] then - export TOX_INDEX_URL='http://pypi.openstack.org/openstack' + # wheel mirrors are below a dir level containing distro and release + # because the wheel format itself does not distinguish + distro=`lsb_release -i -r -s | xargs | tr ' ' '-'` + + export TOX_INDEX_URL="http://pypi.openstack.org/openstack/$distro" 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 +index-url = http://pypi.openstack.org/openstack/$distro +extra-index-url = http://pypi.openstack.org/openstack EOF else cat < ~/.pip/pip.conf [global] timeout = 60 -index-url = http://pypi.openstack.org/openstack +index-url = http://pypi.openstack.org/openstack/$distro +extra-index-url = http://pypi.openstack.org/openstack extra-index-url = http://pypi.python.org/simple EOF fi