blob: 50edb890e232d60a7c561f1f33aaaaf9c18de556 (
plain)
1 # Description: A Python module for determining appropriate platform-specific dirs.
2 # URL: https://pypi.python.org/pypi/packaging/
3 # Maintainer: Danny Rawlins, crux at romster dot me
4 # Depends on: python
5
6 name=python-appdirs
7 version=1.4.3
8 release=1
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
30 /usr/bin/python setup.py build
31
32 /usr/bin/python setup.py install \
33 --prefix=/usr --root=$PKG --optimize=1
34 fi
35 }
|