1SUMMARY="World timezone definitions for Python" 2DESCRIPTION="pytz brings the Olson tz database into Python. \ 3It allows accurate and cross platform timezone calculations. \ 4It also solves the issue of ambiguous times at the end of daylight saving time." 5HOMEPAGE="https://pythonhosted.org/pytz/ 6 https://pypi.org/project/pytz/" 7COPYRIGHT="2003-2019 Stuart Bishop" 8LICENSE="MIT" 9REVISION="2" 10SOURCE_URI="https://pypi.io/packages/source/${portName:0:1}/$portName/$portName-$portVersion.tar.gz" 11CHECKSUM_SHA256="1d8ce29db189191fb55338ee6d0387d82ab59f3d00eac103412d64e0ebd0c588" 12 13ARCHITECTURES="any" 14 15PROVIDES=" 16 $portName = $portVersion 17 " 18REQUIRES=" 19 haiku 20 " 21 22BUILD_REQUIRES=" 23 haiku_devel 24 " 25 26PYTHON_PACKAGES=(python39 python310) 27PYTHON_VERSIONS=(3.9 3.10) 28defaultTestVersion="python39" 29for i in "${!PYTHON_PACKAGES[@]}"; do 30 pythonPackage=${PYTHON_PACKAGES[i]} 31 pythonVersion=${PYTHON_VERSIONS[$i]} 32 33 eval "PROVIDES_$pythonPackage=\" 34 ${portName}_$pythonPackage = $portVersion 35 \"" 36 eval "REQUIRES_$pythonPackage=\" 37 haiku 38 cmd:python$pythonVersion 39 \"" 40 BUILD_REQUIRES+=" 41 setuptools_$pythonPackage 42 " 43 BUILD_PREREQUIRES+=" 44 cmd:python$pythonVersion 45 " 46done 47 48TEST_REQUIRES=" 49 pytz_$defaultTestVersion 50 cmd:pytest 51 " 52 53INSTALL() 54{ 55 myLicensesDir=$dataDir/licenses/packages/pytz 56 57 for i in "${!PYTHON_PACKAGES[@]}"; do 58 pythonPackage=${PYTHON_PACKAGES[i]} 59 pythonVersion=${PYTHON_VERSIONS[$i]} 60 61 python=python$pythonVersion 62 installLocation=$prefix/lib/$python/vendor-packages/ 63 export PYTHONPATH=$installLocation:$PYTHONPATH 64 65 mkdir -p $installLocation 66 rm -rf build 67 68 $python setup.py build install \ 69 --root=/ --prefix=$prefix 70 71 install -m 755 -d "$myLicensesDir" "$docDir" 72 install -m 644 -t "$myLicensesDir" LICENSE.txt 73 install -m 644 -t "$docDir" README.rst 74 75 packageEntries $pythonPackage \ 76 "$dataDir" \ 77 "$docDir" \ 78 "$prefix"/lib/$python 79 done 80} 81 82TEST() 83{ 84 pytest -v 85} 86