Files
haikuports/dev-python/frozendict/frozendict-2.3.8.recipe
Oscar Lesta 9627ce72c1 frozendict: drop Python 3.9 support.
Only user on-tree (youcompleteme) is already 3.10 only.
2025-09-19 22:53:14 -03:00

75 lines
2.0 KiB
Bash

SUMMARY="A simple immutable dictionary for Python"
DESCRIPTION="frozendict is a simple immutable dictionary. It's fast as dict, and sometimes faster!
Unlike other similar implementations, immutability is guaranteed: you can't change the internal \
variables of the class, and they are all immutable objects. Reinvoking __init__ does not alter \
the object.
The API is the same as dict, without methods that can change the immutability. So it supports also \
fromkeys, unlike other implementations. Furthermore it can be pickled, unpickled and have an hash, \
if all values are hashable.
You can also add any dict to a frozendict using the | operator. The result is a new frozendict."
HOMEPAGE="https://github.com/Marco-Sulla/python-frozendict"
COPYRIGHT="2012-2016 Santiago Lezica"
LICENSE="MIT"
REVISION="2"
SOURCE_URI="https://pypi.python.org/packages/source/${portName:0:1}/$portName/$portName-$portVersion.tar.gz"
CHECKSUM_SHA256="5526559eca8f1780a4ee5146896f59afc31435313560208dd394a3a5e537d3ff"
# We are not building the optional C extension (use env-var CIBUILDWHEEL=1 for that),
# so we remain "any" here.
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+="
build_$pythonPackage
installer_$pythonPackage
setuptools_$pythonPackage
wheel_$pythonPackage
"
BUILD_PREREQUIRES+="
cmd:python$pythonVersion
"
done
INSTALL()
{
for pythonVersion in ${PYTHON_VERSIONS[@]}; do
pythonPackage=python${pythonVersion//.}
python=python$pythonVersion
# upstream `build.sh` does this:
rm -rf build dist *.egg-info
$python -m build --wheel --skip-dependency-check --no-isolation
$python -m installer --p $prefix dist/*.whl
packageEntries $pythonPackage \
$prefix/lib/python*
done
}