SUMMARY="Download, build, install, upgrade, and uninstall Python packages" DESCRIPTION="EasyInstall (easy_install) gives you a quick and painless way \ to install packages remotely by connecting to the cheeseshop or even other \ websites via HTTP. It is somewhat analogous to the CPAN and PEAR tools for \ Perl and PHP, respectively." HOMEPAGE="https://pypi.python.org/pypi/setuptools" COPYRIGHT="2006-2019 Python Packaging Authority" LICENSE="Python" REVISION="1" SOURCE_URI="https://github.com/pypa/setuptools/archive/v$portVersion.tar.gz" SOURCE_FILENAME="setuptools-$portVersion.tar.gz" CHECKSUM_SHA256="8e45c6cb18f81842421560f788521842572a91a0e64419e338a6a15828ccf076" ARCHITECTURES="any" PROVIDES=" $portName = $portVersion " REQUIRES=" haiku " BUILD_REQUIRES=" haiku_devel " BUILD_PREREQUIRES=" cmd:sed " PYTHON_PACKAGES=(python3 python38 python39 python310) PYTHON_VERSIONS=(3.7 3.8 3.9 3.10) for i in "${!PYTHON_PACKAGES[@]}"; do pythonPackage=${PYTHON_PACKAGES[i]} pythonVersion=${PYTHON_VERSIONS[$i]} eval "PROVIDES_${pythonPackage}=\"\ ${portName}_$pythonPackage = $portVersion\n\ cmd:easy_install_$pythonVersion\n\ \"; \ REQUIRES_$pythonPackage=\"\ haiku\n\ cmd:python$pythonVersion\n\ \"" BUILD_PREREQUIRES="$BUILD_PREREQUIRES cmd:python$pythonVersion" done BUILD() { rm -rf build* for i in "${!PYTHON_PACKAGES[@]}"; do pythonPackage=${PYTHON_PACKAGES[i]} pythonVersion=${PYTHON_VERSIONS[$i]} # GENERIC: all python_setuptools-based installs need this python=$portPackageLinksDir/cmd~python$pythonVersion/bin/python$pythonVersion installLocation=$prefix/lib/python$pythonVersion/vendor-packages/ $python bootstrap.py $python setup.py build mv build build$pythonVersion done } INSTALL() { for i in "${!PYTHON_PACKAGES[@]}"; do pythonPackage=${PYTHON_PACKAGES[i]} pythonVersion=${PYTHON_VERSIONS[$i]} python=python$pythonVersion installLocation=$prefix/lib/$python/vendor-packages/ export PYTHONPATH=$installLocation:$PYTHONPATH mkdir -p $installLocation mv build$pythonVersion build $python setup.py install \ --root=/ --prefix=$prefix --skip-build sed -i -e "s|^#\!.*/usr/bin/env python|#!/bin/env python$pythonVersion|" $binDir/easy_install* rm $binDir/easy_install packageEntries $pythonPackage \ $prefix/lib/python* \ $binDir mv build build$pythonVersion done }