1SUMMARY="Python bindings of libdiscid by MusicBrainz" 2DESCRIPTION="Python-discid implements Python bindings for MusicBrainz Libdiscid." 3HOMEPAGE="https://python-discid.readthedocs.io/" 4COPYRIGHT="Johannes Dewender" 5LICENSE="GNU LGPL v2.1" 6REVISION="6" 7SOURCE_URI="https://files.pythonhosted.org/packages/source/d/$portName/$portName-$portVersion.tar.gz" 8CHECKSUM_SHA256="cd9630bc53f5566df92819641040226e290b2047573f2c74a6e92b8eed9e86b9" 9SOURCE_DIR="discid-$portVersion" 10 11ARCHITECTURES="any" 12 13PROVIDES=" 14 $portName = $portVersion 15 " 16REQUIRES=" 17 haiku 18 libdiscid 19 " 20 21BUILD_REQUIRES=" 22 haiku_devel 23 " 24 25PYTHON_PACKAGES=(python39 python310) 26PYTHON_VERSIONS=(3.9 3.10) 27for i in "${!PYTHON_PACKAGES[@]}"; do 28 pythonPackage=${PYTHON_PACKAGES[i]} 29 pythonVersion=${PYTHON_VERSIONS[$i]} 30 31 eval "PROVIDES_${pythonPackage}=\" 32 ${portName}_$pythonPackage = $portVersion 33 \"" 34 eval "REQUIRES_$pythonPackage=\"$REQUIRES 35 cmd:python$pythonVersion 36 \"" 37 BUILD_REQUIRES+=" 38 setuptools_$pythonPackage 39 " 40 BUILD_PREREQUIRES+=" 41 cmd:python$pythonVersion 42 " 43done 44 45 46INSTALL() 47{ 48 for i in "${!PYTHON_PACKAGES[@]}"; do 49 pythonPackage=${PYTHON_PACKAGES[i]} 50 pythonVersion=${PYTHON_VERSIONS[$i]} 51 52 python=python$pythonVersion 53 installLocation=$prefix/lib/$python/vendor-packages/ 54 export PYTHONPATH=$installLocation:$PYTHONPATH 55 56 mkdir -p $installLocation 57 rm -rf build 58 59 $python setup.py build install \ 60 --root=/ --prefix=$prefix 61 62 packageEntries $pythonPackage \ 63 $prefix/lib/python* 64 done 65} 66