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
|
2017-02-04 01:20:44 +11:00
|
|
|
version=9.0.1
|
2017-02-04 01:21:50 +11:00
|
|
|
release=2
|
2017-02-12 13:28:09 +11:00
|
|
|
source=(https://files.pythonhosted.org/packages/source/${name:7:1}/${name#*-}/${name#*-}-$version.tar.gz
|
2017-02-04 01:21:50 +11:00
|
|
|
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-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
|
2017-02-04 01:20:44 +11:00
|
|
|
}
|