2014-01-20 00:55:51 +11:00
|
|
|
# Description: Easily download, build, install, upgrade, and uninstall Python packages.
|
2017-02-04 11:38:30 +11:00
|
|
|
# URL: https://pypi.python.org/pypi/setuptools
|
2014-11-10 23:25:50 +11:00
|
|
|
# Maintainer: Danny Rawlins, crux at romster dot me
|
2017-02-05 15:09:50 +11:00
|
|
|
# Depends on: python-appdirs python-packaging python-pip
|
2014-01-20 00:55:51 +11:00
|
|
|
|
2017-02-18 15:45:14 +11:00
|
|
|
name=python-setuptools
|
2018-06-18 01:19:34 +10:00
|
|
|
version=39.2.0
|
2014-08-15 17:57:35 +10:00
|
|
|
release=1
|
2017-02-18 15:45:14 +11:00
|
|
|
source=(https://files.pythonhosted.org/packages/source/${name:7:1}/${name#*-}/${name#*-}-$version.zip
|
2018-03-29 23:12:29 +11:00
|
|
|
https://crux.ster.zone/downloads/get-pip.py
|
|
|
|
# https://bootstrap.pypa.io/get-pip.py
|
|
|
|
)
|
2014-01-20 00:55:51 +11:00
|
|
|
|
|
|
|
build() {
|
2017-02-05 15:09:50 +11:00
|
|
|
cd ${name#*-}-$version
|
2014-01-20 00:55:51 +11:00
|
|
|
|
2016-12-16 15:31:58 +11:00
|
|
|
export SETUPTOOLS_INSTALL_WINDOWS_SPECIFIC_FILES=0
|
|
|
|
|
2017-02-05 15:09:50 +11:00
|
|
|
if [ "$(pkginfo -i | egrep -c '^python-(setuptools|appdirs|pyparsing|six|pip|packaging) ')" != 6 ]; then
|
2017-02-04 01:30:38 +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:30:38 +11:00
|
|
|
/usr/bin/python $SRC/get-pip.py --root=$SRC/build
|
2014-01-20 00:55:51 +11:00
|
|
|
|
2017-02-04 18:07:38 +11:00
|
|
|
local PYTHONVERSION=$(/usr/bin/python -c 'import sys; print("%s.%s" % sys.version_info[:2])')
|
|
|
|
|
|
|
|
PYTHONPATH=$SRC/build/usr/lib/python$PYTHONVERSION/site-packages \
|
2017-02-04 01:30:38 +11:00
|
|
|
/usr/bin/python bootstrap.py
|
|
|
|
|
2017-02-04 18:07:38 +11:00
|
|
|
PYTHONPATH=$SRC/build/usr/lib/python$PYTHONVERSION/site-packages \
|
2017-02-04 01:30:38 +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:30:38 +11:00
|
|
|
/usr/bin/python setup.py install \
|
|
|
|
--prefix=/usr --root=$PKG --optimize=1
|
|
|
|
else
|
|
|
|
|
|
|
|
/usr/bin/python bootstrap.py
|
|
|
|
/usr/bin/python setup.py build
|
|
|
|
|
|
|
|
/usr/bin/python setup.py install \
|
|
|
|
--prefix=/usr --root=$PKG --optimize=1
|
|
|
|
fi
|
2017-02-04 18:07:38 +11:00
|
|
|
|
|
|
|
unset SETUPTOOLS_INSTALL_WINDOWS_SPECIFIC_FILES
|
2014-01-20 00:55:51 +11:00
|
|
|
}
|