Skip to content

Commit 16d97b2

Browse files
committed
Fix get pypi wheel url
1 parent 70c9f62 commit 16d97b2

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

dist/verify_checksums.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ EXTENSIONS[1]="-py2.py3-none-any.whl"
3434

3535
APACHE_MIRROR_URL="http://www.apache.org/dist/libcloud"
3636
PYPI_MIRROR_URL_SOURCE="https://pypi.python.org/packages/source/a/apache-libcloud"
37-
PYPI_MIRROR_URL_WHEEL="https://files.pythonhosted.org/packages/py3/a/apache-libcloud"
37+
PYPI_SIMPLE_URL="https://pypi.org/simple/apache-libcloud/"
3838

3939
# From http://tldp.org/LDP/abs/html/debugging.html#ASSERT
4040
function assert () # If condition false,
@@ -78,7 +78,8 @@ do
7878
pypi_url="${PYPI_MIRROR_URL}/${file_name}"
7979

8080
if [ "${extension}" = "-py2.py3-none-any.whl" ]; then
81-
pypi_url="${PYPI_MIRROR_URL_WHEEL}/${file_name}"
81+
# Get the wheel full URL from PyPi Simple index
82+
pypi_url=$(curl -s ${PYPI_SIMPLE_URL} | grep ${file_name} | sed -n 's/.*href="\([^"]*\)".*/\1/p')
8283
else
8384
pypi_url="${PYPI_MIRROR_URL_SOURCE}/${file_name}"
8485
fi

0 commit comments

Comments
 (0)