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