2015-05-07 13:57:27 +01:00
|
|
|
# This script performs bootstrap installation of upip package manager from PyPI
|
|
|
|
# All the other packages can be installed using it.
|
|
|
|
|
2015-05-29 20:34:36 +01:00
|
|
|
saved="$PWD"
|
|
|
|
|
|
|
|
if [ "$1" = "" ]; then
|
|
|
|
dest=~/.micropython/lib/
|
|
|
|
else
|
|
|
|
dest="$1"
|
|
|
|
fi
|
|
|
|
|
2015-05-07 13:57:27 +01:00
|
|
|
if [ -z "$TMPDIR" ]; then
|
|
|
|
cd /tmp
|
|
|
|
else
|
|
|
|
cd $TMPDIR
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Remove any stale old version
|
|
|
|
rm -rf micropython-upip-*
|
2018-04-23 07:11:27 +01:00
|
|
|
wget -nd -rH -l1 -D files.pythonhosted.org https://pypi.org/project/micropython-upip/ --reject=html
|
2015-05-07 13:57:27 +01:00
|
|
|
|
|
|
|
tar xfz micropython-upip-*.tar.gz
|
2015-05-29 20:34:36 +01:00
|
|
|
tmpd="$PWD"
|
|
|
|
|
|
|
|
cd "$saved"
|
|
|
|
mkdir -p "$dest"
|
|
|
|
cp "$tmpd"/micropython-upip-*/upip*.py "$dest"
|
2015-05-07 13:57:27 +01:00
|
|
|
|
|
|
|
echo "upip is installed. To use:"
|
|
|
|
echo "micropython -m upip --help"
|