blob: 39ef7275db70320f2cfccd16e362fb5f43bd3d8d (
plain)
1 # Description: Core utilities for Python packages.
2 # URL: https://pypi.python.org/pypi/packaging/
3 # Maintainer: Danny Rawlins, crux at romster dot me
4 # Depends on: python3-pyparsing python3-six
5
6 name=python3-packaging
7 version=16.8
8 release=1
9 source=(https://files.pythonhosted.org/packages/source/${name:8: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 '^python3-(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/python3 $SRC/get-pip.py --root=$SRC/build
19
20 local PYTHONVERSION=$(/usr/bin/python3 -c 'import sys; print("%s.%s" % sys.version_info[:2])')
21
22 PYTHONPATH=$SRC/build/usr/lib/python$PYTHONVERSION/site-packages \
23 /usr/bin/python3 setup.py build
24
25 PYTHONPATH=$SRC/build/usr/lib/python$PYTHONVERSION/site-packages \
26 /usr/bin/python3 setup.py install \
27 --prefix=/usr --root=$PKG --optimize=1
28 else
29
30 /usr/bin/python3 setup.py build
31
32 /usr/bin/python3 setup.py install \
33 --prefix=/usr --root=$PKG --optimize=1
34 fi
35 }
|