blob: 527df499cb0256cc9a19b33e455ee7344e97bd2a (
plain)
1 # Description: Python parsing module.
2 # URL: https://pypi.python.org/pypi/pyparsing/
3 # Maintainer: Danny Rawlins, crux at romster dot me
4 # Depends on: python
5
6 name=python-pyparsing
7 version=2.1.10
8 release=3
9 source=(https://files.pythonhosted.org/packages/source/${name:7:1}/${name#*-}/${name#*-}-$version.tar.gz
10 https://bootstrap.pypa.io/get-pip.py)
11
12 build() {
13 cd ${name#*-}-$version
14
15 if [ "$(pkginfo -i | egrep -c '^python-(setuptools|appdirs|pyparsing|six|pip|packaging) ')" != 6 ]; then
16 install -d build
17 sed -i 's/"--upgrade"/"--upgrade", "--upgrade-strategy", "only-if-needed"/' $SRC/get-pip.py
18 /usr/bin/python $SRC/get-pip.py --root=$SRC/build
19
20 local PYTHONVERSION=$(/usr/bin/python -c 'import sys; print("%s.%s" % sys.version_info[:2])')
21
22 PYTHONPATH=$SRC/build/usr/lib/python$PYTHONVERSION/site-packages \
23 /usr/bin/python setup.py build
24
25 PYTHONPATH=$SRC/build/usr/lib/python$PYTHONVERSION/site-packages \
26 /usr/bin/python setup.py install \
27 --prefix=/usr --root=$PKG --optimize=1
28 else
29 /usr/bin/python setup.py build
30
31 /usr/bin/python setup.py install \
32 --prefix=/usr --root=$PKG --optimize=1
33 fi
34
35 local PYTHONVERSION=$(/usr/bin/python -c 'import sys; print("%s.%s" % sys.version_info[:2])')
36 find $PKG/usr/lib/python$PYTHONVERSION/site-packages -type f -exec chmod go-w {} +
37 }
|