1SUMMARY="Complexity checker for Python" 2DESCRIPTION="Ned's script to check McCabe complexity. 3 4This module provides a plugin for flake8, the Python code checker." 5HOMEPAGE="https://github.com/PyCQA/mccabe" 6COPYRIGHT="<year> Ned Batchelder 7 2011-2013 Tarek Ziade 8 2013 Florent Xicluna" 9LICENSE="MIT" 10REVISION="3" 11SOURCE_URI="$HOMEPAGE/archive/refs/tags/$portVersion.tar.gz" 12CHECKSUM_SHA256="f4f7fa5ed8b7f77601fea3e748d6238928323a291fcde0fddbbe6cb2d0cb2da2" 13 14ARCHITECTURES="any" 15 16PROVIDES=" 17 $portName = $portVersion 18 " 19REQUIRES=" 20 haiku 21 " 22 23BUILD_REQUIRES=" 24 haiku_devel 25 " 26 27PYTHON_PACKAGES=(python39 python310) 28PYTHON_VERSIONS=(3.9 3.10) 29for i in "${!PYTHON_PACKAGES[@]}"; do 30pythonPackage=${PYTHON_PACKAGES[i]} 31pythonVersion=${PYTHON_VERSIONS[$i]} 32eval "PROVIDES_${pythonPackage}=\"\ 33 ${portName}_$pythonPackage = $portVersion\ 34 \"; \ 35REQUIRES_$pythonPackage=\"\ 36 haiku\n\ 37 cmd:python$pythonVersion\ 38 \"" 39BUILD_REQUIRES="$BUILD_REQUIRES 40 setuptools_$pythonPackage" 41BUILD_PREREQUIRES="$BUILD_PREREQUIRES 42 cmd:python$pythonVersion" 43done 44 45INSTALL() 46{ 47 for i in "${!PYTHON_PACKAGES[@]}"; do 48 pythonPackage=${PYTHON_PACKAGES[i]} 49 pythonVersion=${PYTHON_VERSIONS[$i]} 50 51 python=python$pythonVersion 52 installLocation=$prefix/lib/$python/vendor-packages/ 53 export PYTHONPATH=$installLocation:$PYTHONPATH 54 mkdir -p $installLocation 55 rm -rf build 56 $python setup.py build install \ 57 --root=/ --prefix=$prefix 58 59 packageEntries $pythonPackage \ 60 $prefix/lib/python* 61 done 62} 63