46 lines
1.5 KiB
Plaintext
46 lines
1.5 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: python3-appdirs python3-packaging python3-pip
|
|
|
|
name=python3-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 '^python3-(setuptools|appdirs|pyparsing|six|pip|packaging) ')" != 6 ]; then
|
|
install -d build
|
|
/usr/bin/python3 $SRC/get-pip.py --root=$SRC/build
|
|
|
|
local PYTHONVERSION=$(/usr/bin/python3 -c 'import sys; print("%s.%s" % sys.version_info[:2])')
|
|
|
|
PYTHONPATH=$SRC/build/usr/lib/python$PYTHONVERSION/site-packages \
|
|
/usr/bin/python3 bootstrap.py
|
|
|
|
PYTHONPATH=$SRC/build/usr/lib/python$PYTHONVERSION/site-packages \
|
|
/usr/bin/python3 setup.py build
|
|
|
|
PYTHONPATH=$SRC/build/usr/lib/python$PYTHONVERSION/site-packages \
|
|
/usr/bin/python3 setup.py install \
|
|
--prefix=/usr --root=$PKG --optimize=1
|
|
else
|
|
|
|
/usr/bin/python3 bootstrap.py
|
|
/usr/bin/python3 setup.py build
|
|
|
|
/usr/bin/python3 setup.py install \
|
|
--prefix=/usr --root=$PKG --optimize=1
|
|
fi
|
|
|
|
unset SETUPTOOLS_INSTALL_WINDOWS_SPECIFIC_FILES
|
|
|
|
rm $PKG/usr/bin/easy_install
|
|
}
|