summaryrefslogtreecommitdiff
blob: 3c96a581a77f3c49f129596bd12aaa7817e233c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-python/python-xlib/python-xlib-0.14.ebuild,v 1.1 2008/02/27 23:27:31 dev-zero Exp $

inherit distutils

DESCRIPTION="A fully functional X client library for Python, written in Python"
HOMEPAGE="http://python-xlib.sourceforge.net/"
SRC_URI="mirror://sourceforge/python-xlib/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~ppc64 ~x86"
IUSE="doc"
DEPEND="${RDEPEND}
	doc? ( virtual/latex-base
		>=sys-apps/texinfo-4.8-r2 )"

PYTHON_MODNAME="Xlib"

src_compile() {
	distutils_src_compile
	if use doc; then
		cd doc
		emake || die "make docs failed"
	fi
}

src_install () {
	distutils_src_install
	if use doc; then
		dohtml -r doc/html/
		dodoc doc/ps/python-xlib.ps
	fi
}

src_test() {
	distutils_python_version
	for pytest in $(ls test/*py); do
		PYTHONPATH=. "${python}" ${pytest} || die "test failed"
	done
}