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