2017-02-04 11:38:30 +11:00
|
|
|
# Description: Python parsing module.
|
|
|
|
# URL: https://pypi.python.org/pypi/pyparsing/
|
|
|
|
# Maintainer: Danny Rawlins, crux at romster dot me
|
|
|
|
# Depends on: python
|
2017-02-04 01:16:05 +11:00
|
|
|
|
2017-02-05 15:14:03 +11:00
|
|
|
name=python-pyparsing
|
2017-04-14 00:35:05 +10:00
|
|
|
version=2.2.0
|
|
|
|
release=1
|
2017-02-18 15:31:01 +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:16:05 +11:00
|
|
|
|
|
|
|
build() {
|
2017-02-05 15:14:03 +11:00
|
|
|
cd ${name#*-}-$version
|
2017-02-04 01:16:05 +11:00
|
|
|
|
2017-02-05 15:14:03 +11:00
|
|
|
if [ "$(pkginfo -i | egrep -c '^python-(setuptools|appdirs|pyparsing|six|pip|packaging) ')" != 6 ]; then
|
2017-02-04 01:17:33 +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:17:33 +11:00
|
|
|
/usr/bin/python $SRC/get-pip.py --root=$SRC/build
|
2017-02-04 01:16:05 +11:00
|
|
|
|
2017-03-04 14:21:01 +11:00
|
|
|
local PYTHONVERSION=$(/usr/bin/python -c 'import sys; print("%s.%s" % sys.version_info[:2])')
|
|
|
|
|
2017-02-04 18:07:38 +11:00
|
|
|
PYTHONPATH=$SRC/build/usr/lib/python$PYTHONVERSION/site-packages \
|
2017-02-04 01:17:33 +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:17:33 +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-17 14:18:13 +11:00
|
|
|
|
2017-03-04 14:21:01 +11:00
|
|
|
local PYTHONVERSION=$(/usr/bin/python -c 'import sys; print("%s.%s" % sys.version_info[:2])')
|
2017-02-17 14:18:13 +11:00
|
|
|
find $PKG/usr/lib/python$PYTHONVERSION/site-packages -type f -exec chmod go-w {} +
|
2017-02-04 01:16:05 +11:00
|
|
|
}
|