Files
haikuports/dev-python/pytz/pytz-2023.3.recipe
Oscar Lesta 679ed1e578 pytz: drop Python 3.9 support.
Only pandas (disabled recipe) uses this, and that already targets 3.10.
2025-09-19 22:53:14 -03:00

83 lines
1.7 KiB
Bash

SUMMARY="World timezone definitions for Python"
DESCRIPTION="pytz brings the Olson tz database into Python. \
It allows accurate and cross platform timezone calculations. \
It also solves the issue of ambiguous times at the end of daylight saving time."
HOMEPAGE="https://pythonhosted.org/pytz/
https://pypi.org/project/pytz/"
COPYRIGHT="2003-2019 Stuart Bishop"
LICENSE="MIT"
REVISION="3"
SOURCE_URI="https://pypi.io/packages/source/${portName:0:1}/$portName/$portName-$portVersion.tar.gz"
CHECKSUM_SHA256="1d8ce29db189191fb55338ee6d0387d82ab59f3d00eac103412d64e0ebd0c588"
ARCHITECTURES="any"
PROVIDES="
$portName = $portVersion
"
REQUIRES="
haiku
"
BUILD_REQUIRES="
haiku_devel
"
PYTHON_VERSIONS=(3.10)
for pythonVersion in ${PYTHON_VERSIONS[@]}; do
pythonPackage=python${pythonVersion//.}
eval "PROVIDES_$pythonPackage=\"
${portName}_$pythonPackage = $portVersion
\""
eval "REQUIRES_$pythonPackage=\"
haiku
cmd:python$pythonVersion
\""
BUILD_REQUIRES+="
setuptools_$pythonPackage
"
BUILD_PREREQUIRES+="
cmd:python$pythonVersion
"
done
TEST_REQUIRES="
pytz_$defaultTestVersion
cmd:pytest
"
INSTALL()
{
myLicensesDir=$dataDir/licenses/packages/pytz
for pythonVersion in ${PYTHON_VERSIONS[@]}; do
pythonPackage=python${pythonVersion//.}
python=python$pythonVersion
installLocation=$prefix/lib/$python/vendor-packages/
export PYTHONPATH=$installLocation:$PYTHONPATH
mkdir -p $installLocation
rm -rf build
$python setup.py build install \
--root=/ --prefix=$prefix
install -m 755 -d "$myLicensesDir" "$docDir"
install -m 644 -t "$myLicensesDir" LICENSE.txt
install -m 644 -t "$docDir" README.rst
packageEntries $pythonPackage \
"$dataDir" \
"$docDir" \
"$prefix"/lib/$python
done
}
TEST()
{
pytest -v
}