SUMMARY="Python implementation of the AES block cipher algorithm"
DESCRIPTION="A pure-Python implementation of the AES block cipher algorithm \
and the common modes of operation (CBC, CFB, CTR, ECB and OFB)."
HOMEPAGE="https://pypi.python.org/pypi/pip"
COPYRIGHT="2014 Richard Moore"
LICENSE="MIT"
REVISION="1"
SOURCE_URI="https://pypi.org/packages/source/p/pyaes/pyaes-$portVersion.tar.gz"
CHECKSUM_SHA256="02c1b1405c38d3c370b085fb952dd8bea3fadcee6411ad99f312cc129c536d8f"

ARCHITECTURES="any"

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

BUILD_REQUIRES="
	haiku_devel
	"

PYTHON_PACKAGES=(python python3)
PYTHON_VERSIONS=(2.7 3.7)
for i in "${!PYTHON_PACKAGES[@]}"; do
pythonPackage=${PYTHON_PACKAGES[i]}
pythonVersion=${PYTHON_VERSIONS[$i]}
eval "PROVIDES_${pythonPackage}=\"\
	${portName}_$pythonPackage = $portVersion\n\
	\"; \
REQUIRES_$pythonPackage=\"\
	haiku\n\
	cmd:python$pythonVersion\n\
	setuptools_$pythonPackage\n\
	\""
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
}
