summaryrefslogtreecommitdiff
path: root/python3-setuptools/Pkgfile
blob: 61886b988bfaea653bf6356229880df0d4d7cfc0 (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: python3-appdirs python3-packaging python3-pip
    5 
    6 name=python3-setuptools
    7 version=36.2.4
    8 release=1
    9 source=(https://files.pythonhosted.org/packages/source/${name:8: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 '^python3-(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/python3 $SRC/get-pip.py --root=$SRC/build
   21 
   22 		local PYTHONVERSION=$(/usr/bin/python3 -c 'import sys; print("%s.%s" % sys.version_info[:2])')
   23 
   24 		PYTHONPATH=$SRC/build/usr/lib/python$PYTHONVERSION/site-packages \
   25 			/usr/bin/python3 bootstrap.py
   26 
   27 		PYTHONPATH=$SRC/build/usr/lib/python$PYTHONVERSION/site-packages \
   28 			/usr/bin/python3 setup.py build
   29 
   30 		PYTHONPATH=$SRC/build/usr/lib/python$PYTHONVERSION/site-packages \
   31 			/usr/bin/python3 setup.py install \
   32 			--prefix=/usr --root=$PKG --optimize=1
   33 	else
   34 
   35 		/usr/bin/python3 bootstrap.py 
   36 		/usr/bin/python3 setup.py build
   37 
   38 		/usr/bin/python3 setup.py install \
   39 			--prefix=/usr --root=$PKG --optimize=1
   40 	fi
   41 
   42 	unset SETUPTOOLS_INSTALL_WINDOWS_SPECIFIC_FILES
   43 
   44 	rm $PKG/usr/bin/easy_install
   45 }

Generated by cgit