Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 474692
Collapse All | Expand All

(-)pycups-1.9.62.ebuild (-25 / +19 lines)
Lines 2-51 Link Here
2
# Distributed under the terms of the GNU General Public License v2
2
# Distributed under the terms of the GNU General Public License v2
3
# $Header: /var/cvsroot/gentoo-x86/dev-python/pycups/pycups-1.9.62.ebuild,v 1.7 2012/12/01 19:08:16 armin76 Exp $
3
# $Header: /var/cvsroot/gentoo-x86/dev-python/pycups/pycups-1.9.62.ebuild,v 1.7 2012/12/01 19:08:16 armin76 Exp $
4
4
5
EAPI="3"
5
EAPI=5
6
6
7
PYTHON_DEPEND="2:2.5"
7
PYTHON_COMPAT=( python{2_5,2_6,2_7} pypy{1_9,2_0} )
8
RESTRICT_PYTHON_ABIS="*-jython"
8
inherit distutils-r1
9
inherit distutils flag-o-matic
10
9
11
DESCRIPTION="Python bindings for the CUPS API"
10
DESCRIPTION="Python bindings for the CUPS API"
12
HOMEPAGE="http://cyberelk.net/tim/data/pycups/"
11
HOMEPAGE="http://cyberelk.net/tim/data/pycups/"
13
SRC_URI="http://cyberelk.net/tim/data/pycups/${P}.tar.bz2"
12
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.bz2"
14
13
15
LICENSE="GPL-2"
14
LICENSE="GPL-2"
16
KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sh sparc x86"
15
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sh ~sparc ~x86"
17
SLOT="0"
16
SLOT="0"
18
IUSE="doc examples"
17
IUSE="doc examples"
19
18
20
RDEPEND="
19
RDEPEND="
21
	net-print/cups
20
	net-print/cups
22
"
21
"
22
23
# epydoc kinda sucks and supports python2 only (it's dead too),
24
# and since we're dealing with a binary module we need exact version
25
# match. therefore, docbuilding *requires* any python2 being enabled.
26
23
DEPEND="${RDEPEND}
27
DEPEND="${RDEPEND}
24
	doc? ( dev-python/epydoc )
28
	doc? ( dev-python/epydoc[$(python_gen_usedep 'python2*')] )
25
"
29
"
26
30
27
pkg_setup() {
31
REQUIRED_USE="doc? ( $(python_gen_useflags 'python2*') )"
28
	python_set_active_version 2
29
}
30
31
src_compile() {
32
	append-cflags -DVERSION=\\\"${PV}\\\"
33
	distutils_src_compile
34
32
33
python_compile_all() {
35
	if use doc; then
34
	if use doc; then
36
		emake doc || die "emake doc failed"
35
		# we can't use Makefile since it relies on hardcoded paths
36
		epydoc -o html --html cups || die "doc build failed"
37
	fi
37
	fi
38
}
38
}
39
39
40
src_install() {
40
python_install_all() {
41
	distutils_src_install
41
	use doc && local HTML_DOCS=( html/ )
42
42
	use examples && local EXAMPLES=( examples/ )
43
	if use doc; then
44
		dohtml -r html/ || die "installing html docs failed"
45
	fi
46
43
47
	if use examples; then
44
	distutils-r1_python_install_all
48
		insinto /usr/share/doc/"${P}"
49
		doins -r examples/ || die "installing examples failed"
50
	fi
51
}
45
}

Return to bug 474692