44 lines
1.4 KiB
Plaintext
44 lines
1.4 KiB
Plaintext
# Description: Easily download, build, install, upgrade, and uninstall Python packages.
|
|
# URL: https://pypi.python.org/pypi/setuptools
|
|
# Maintainer: Danny Rawlins, crux at romster dot me
|
|
# Depends on: python-appdirs python-packaging python-pip
|
|
|
|
name=python-setuptools
|
|
version=34.1.1
|
|
release=1
|
|
#source=(https://github.com/pypa/setuptools/archive/v$version.tar.gz)
|
|
source=(https://pypi.python.org/packages/e2/51/3ea582a6d64dcd36858a10de31d43ca8ea0a3be5386dd0caf6503167cdfb/setuptools-$version.zip
|
|
https://bootstrap.pypa.io/get-pip.py)
|
|
|
|
build() {
|
|
cd ${name#*-}-$version
|
|
|
|
export SETUPTOOLS_INSTALL_WINDOWS_SPECIFIC_FILES=0
|
|
|
|
if [ "$(pkginfo -i | egrep -c '^python-(setuptools|appdirs|pyparsing|six|pip|packaging) ')" != 6 ]; then
|
|
install -d build
|
|
/usr/bin/python $SRC/get-pip.py --root=$SRC/build
|
|
|
|
local PYTHONVERSION=$(/usr/bin/python -c 'import sys; print("%s.%s" % sys.version_info[:2])')
|
|
|
|
PYTHONPATH=$SRC/build/usr/lib/python$PYTHONVERSION/site-packages \
|
|
/usr/bin/python bootstrap.py
|
|
|
|
PYTHONPATH=$SRC/build/usr/lib/python$PYTHONVERSION/site-packages \
|
|
/usr/bin/python setup.py build
|
|
|
|
PYTHONPATH=$SRC/build/usr/lib/python$PYTHONVERSION/site-packages \
|
|
/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
|
|
|
|
unset SETUPTOOLS_INSTALL_WINDOWS_SPECIFIC_FILES
|
|
}
|