example.sh (329B)
1 cat <<EOF > requirements.txt 2 pip 3 setuptools 4 EOF 5 6 t_in=$(mktemp -d) 7 t_out=$(mktemp -d) 8 t_req=$(mktemp) 9 10 echo -e "pip\nsetuptools" > $t_req 11 12 pip download -d $t_in -r $t_req 13 bash ./pep503.sh $t_in $t_out 14 ls -R $t_out 15 16 # you can now serve $t_out on a webserver and use it as an index argument to pip --index-url or --extra-index-url