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