Last active
August 29, 2015 14:01
-
-
Save timonwong/92d19a2709898ed93c79 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# !!path to the pip binary!! | |
PIP_BIN=/opt/python2.7/bin/pip | |
WHEEL_DIR=wheelhouse | |
DOWNLOAD_CACHE_DIR=cache | |
PIP_WHELL_REQUIREMENT="$@" | |
echo ${PIP_WHELL_REQUIREMENT} | |
#rm -rf ${DOWNLOAD_CACHE_DIR} | |
mkdir -p ${DOWNLOAD_CACHE_DIR} | |
${PIP_BIN} wheel -f "$WHEEL_DIR" \ | |
-i http://pypi.douban.com/simple/ \ | |
-f http://pypi.douban.com/simple/ \ | |
--download-cache "$DOWNLOAD_CACHE_DIR" ${PIP_WHELL_REQUIREMENT} | |
for f in $(find "$DOWNLOAD_CACHE_DIR" -type f -name '*.whl'); do | |
actual_wheel=${f##*%2F} | |
echo "Copying ${f##*/} to ${actual_wheel}..." | |
cp "${f}" "${WHEEL_DIR}/${actual_wheel}" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment