SUMMARY="Filesystem events monitoring"
DESCRIPTION="Python API and shell utilities to monitor file system events."
HOMEPAGE="https://pypi.python.org/pypi/watchdog"

SOURCE_URI="https://pypi.python.org/packages/source/w/watchdog/watchdog-0.8.2.tar.gz"
CHECKSUM_SHA256="33a9ab3ce2e6b1aca4d2a50752231668d69bdba4ab096d9742195ccfbef1e023"
LICENSE="Apache v2"
COPYRIGHT="
	2011 Yesudeep Mangalapilly
	2012 Google, Inc.
	"
REVISION="1"

ARCHITECTURES="x86 x86_gcc2 x86_64"

SOURCE_DIR="watchdog-$portVersion"

PROVIDES="
	watchdog = $portVersion
	cmd:watchmedo
	"

REQUIRES="
	haiku
	cmd:python
	argh
	pathtools
	pyyaml
	"

BUILD_REQUIRES="
	haiku_devel
	python_setuptools
	"

BUILD_PREREQUIRES="
	cmd:python
	cmd:gcc
	"

BUILD()
{
	$portPackageLinksDir/cmd~python/bin/python setup.py build
}

INSTALL()
{
	# GENERIC: all python_setuptools-based installs need this
	python=$portPackageLinksDir/cmd~python/bin/python
	pythonVersion=$($python --version 2>&1 | sed 's/Python //' | head -c3)
	installLocation=$prefix/lib/python$pythonVersion/vendor-packages/
	export PYTHONPATH=$installLocation:$PYTHONPATH
	mkdir -p $installLocation

	$python setup.py install \
		--single-version-externally-managed \
		--root=/ --prefix=$prefix
}
