# Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header$ EAPI="3" PYTHON_DEPEND="2" SUPPORT_PYTHON_ABIS="1" RESTRICT_PYTHON_ABIS="3.*" inherit distutils DESCRIPTION="A Python graph-database toolkit oriented primarily on bioinformatics applications" HOMEPAGE="http://code.google.com/p/pygr/" SRC_URI="http://pygr.googlecode.com/files/${P}.tar.gz" LICENSE="BSD" SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="doc examples mysql sqlite" DEPEND="doc? ( dev-python/epydoc dev-python/sphinx )" RDEPEND="mysql? ( dev-python/mysql-python ) sqlite? ( || ( dev-python/pysqlite >=dev-lang/python-2.5[sqlite] ) )" RESTRICT="test" # Only needed for versions up to 0.8.2 src_compile() { distutils_src_compile if use doc; then emake -C doc all epydocs || die "Building documentation failed" fi } src_test() { testing() { "$(PYTHON)" tests/runtest.py -b "build-${PYTHON_ABI}" } python_execute_function testing || die "Running tests failed" } src_install() { distutils_src_install if use doc; then dohtml -r doc/html_new/* || die "Installation of documentation failed" fi if use examples; then insinto /usr/share/doc/${PF}/examples doins misc/pygrrc.example || die "Installation of examples failed" fi }