SUMMARY="An immutable dictionary for Python"
DESCRIPTION="frozendict is an immutable wrapper around dictionaries that \
implements the complete mapping interface. It can be used as a drop-in \
replacement for dictionaries where immutability is desired.

Of course, this is python, and you can still poke around the object’s \
internals if you want.

The frozendict constructor mimics dict, and all of the expected interfaces \
(iter, len, repr, hash, getitem) are provided. Note that a frozendict does \
not guarantee the immutability of its values, so the utility of hash method \
is restricted by usage.

The only difference is that the copy() method of frozendict takes variable \
keyword arguments, which will be present as key/value pairs in the new, \
immutable copy."
HOMEPAGE="https://pypi.org/project/frozendict/"
COPYRIGHT="2012-2016 Santiago Lezica"
LICENSE="MIT"
REVISION="3"
SOURCE_URI="https://files.pythonhosted.org/packages/4e/55/a12ded2c426a4d2bee73f88304c9c08ebbdbadb82569ebdd6a0c007cfd08/frozendict-$portVersion.tar.gz"
CHECKSUM_SHA256="774179f22db2ef8a106e9c38d4d1f8503864603db08de2e33be5b778230f6e45"

ARCHITECTURES="any"

PROVIDES="
	$portName = $portVersion
	"
REQUIRES="
	haiku
	"

BUILD_REQUIRES="
	haiku_devel
	"

PYTHON_PACKAGES=(python python3 python38 python39)
PYTHON_VERSIONS=(2.7 3.7 3.8 3.9)
for i in "${!PYTHON_PACKAGES[@]}"; do
pythonPackage=${PYTHON_PACKAGES[i]}
pythonVersion=${PYTHON_VERSIONS[$i]}
eval "PROVIDES_${pythonPackage}=\"\
	${portName}_$pythonPackage = $portVersion\
	\"; \
REQUIRES_$pythonPackage=\"\
	haiku\n\
	cmd:python$pythonVersion\
	\""
BUILD_REQUIRES="$BUILD_REQUIRES
	setuptools_$pythonPackage"
BUILD_PREREQUIRES="$BUILD_PREREQUIRES
	cmd:python$pythonVersion"
done

INSTALL()
{
	for i in "${!PYTHON_PACKAGES[@]}"; do
		pythonPackage=${PYTHON_PACKAGES[i]}
		pythonVersion=${PYTHON_VERSIONS[$i]}

		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

		packageEntries  $pythonPackage \
			$prefix/lib/python*
	done
}

