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
This commit is contained in:
parent
b5c69b56f3
commit
639c7e7078
@ -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 <<EOF > ~/.pydistutils.cfg
|
||||
[easy_install]
|
||||
index_url = http://pypi.openstack.org/openstack
|
||||
EOF
|
||||
cat <<EOF > ~/.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 <<EOF > ~/.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
|
||||
|
Loading…
Reference in New Issue
Block a user