2017-02-04 11:38:30 +11:00
|
|
|
# Description: A tool for installing and managing Python packages.
|
2017-02-04 17:57:45 +11:00
|
|
|
# URL: https://pypi.python.org/pypi/pip/
|
2017-02-04 11:38:30 +11:00
|
|
|
# Maintainer: Danny Rawlins, crux at romster dot me
|
|
|
|
# Depends on: python
|
2017-02-04 01:20:44 +11:00
|
|
|
|
2017-02-05 15:36:53 +11:00
|
|
|
name=python-pip
|
2018-04-25 23:20:04 +10:00
|
|
|
version=10.0.1
|
|
|
|
release=1
|
2017-02-12 13:28:09 +11:00
|
|
|
source=(https://files.pythonhosted.org/packages/source/${name:7:1}/${name#*-}/${name#*-}-$version.tar.gz
|
2018-03-29 23:12:29 +11:00
|
|
|
https://crux.ster.zone/downloads/get-pip.py
|
|
|
|
# https://bootstrap.pypa.io/get-pip.py
|
|
|
|
)
|
2017-02-04 01:20:44 +11:00
|
|
|
|
|
|
|
build() {
|
2017-02-05 15:36:53 +11:00
|
|
|
cd ${name#*-}-$version
|
2017-02-04 01:21:50 +11:00
|
|
|
|
2017-03-04 21:40:02 +11:00
|
|
|
if [ "$(pkginfo -i | egrep -c '^python-(setuptools|appdirs|pyparsing|six|packaging) ')" != 5 ]; then
|
|
|
|
printf "\e[031mWarning: $name now requires python-setuptools to function and can not be added,
|
|
|
|
as a dependency to $name as this will cause a cyclic dependency loop.
|
|
|
|
Please prt-get depinst python-setuptools to use $name.\033[0m\n"
|
|
|
|
fi
|
|
|
|
|
2017-02-05 15:36:53 +11:00
|
|
|
if [ "$(pkginfo -i | egrep -c '^python-(setuptools|appdirs|pyparsing|six|pip|packaging) ')" != 6 ]; then
|
2017-02-04 01:21:50 +11:00
|
|
|
install -d build
|
2017-03-04 14:21:01 +11:00
|
|
|
sed -i 's/"--upgrade"/"--upgrade", "--upgrade-strategy", "only-if-needed"/' $SRC/get-pip.py
|
2017-02-04 01:21:50 +11:00
|
|
|
/usr/bin/python $SRC/get-pip.py --root=$SRC/build
|
|
|
|
|
2017-02-04 18:07:38 +11:00
|
|
|
local PYTHONVERSION=$(/usr/bin/python -c 'import sys; print("%s.%s" % sys.version_info[:2])')
|
|
|
|
|
|
|
|
PYTHONPATH=$SRC/build/usr/lib/python$PYTHONVERSION/site-packages \
|
2017-02-04 01:21:50 +11:00
|
|
|
/usr/bin/python setup.py build
|
|
|
|
|
2017-02-04 18:07:38 +11:00
|
|
|
PYTHONPATH=$SRC/build/usr/lib/python$PYTHONVERSION/site-packages \
|
2017-02-04 01:21:50 +11:00
|
|
|
/usr/bin/python setup.py install \
|
|
|
|
--prefix=/usr --root=$PKG --optimize=1
|
|
|
|
else
|
|
|
|
/usr/bin/python setup.py build
|
|
|
|
|
|
|
|
/usr/bin/python setup.py install \
|
|
|
|
--prefix=/usr --root=$PKG --optimize=1
|
|
|
|
fi
|
2018-04-15 20:58:36 +10:00
|
|
|
|
|
|
|
chmod -R og-w $PKG
|
2017-02-04 01:20:44 +11:00
|
|
|
}
|