SUMMARY="Python client library for Google data APIs"
DESCRIPTION="
The Google Data APIs (Google Data) provide a simple protocol \
for reading and writing data on the web. Though it is possible \
to use these services with a simple HTTP client, this library \
provides helpful tools to streamline your code and keep up with \
server-side changes.
"
HOMEPAGE="
	https://github.com/google/gdata-python-client
	http://code.google.com/p/gdata-python-client/
	http://pypi.python.org/pypi/gdata
	"
SOURCE_URI="https://pypi.python.org/packages/source/g/gdata/gdata-$portVersion.tar.gz"
CHECKSUM_SHA256="56e7d22de819c22b13ceb0fe1869729b4287f89ebbd4bb55380d7bcf61a1fdb6"
LICENSE="Apache v2"
COPYRIGHT="2006-2014 Google Inc."
REVISION="2"

ARCHITECTURES="any"

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

BUILD_REQUIRES="
	haiku_devel
	"

PYTHON_PACKAGES=(python)
PYTHON_VERSIONS=(2.7)
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
}
