summaryrefslogtreecommitdiff
blob: 0616d5ec550a2f8e26dce979fcdf42aa45627a47 (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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header$

EAPI="4"

#USE_PYTHON="python25 python26 python27"
PYTHON_OPTIONAL="no"

inherit python-distutils-ng

DESCRIPTION="Python library to create spreadsheet files compatible with Excel"
HOMEPAGE="http://pypi.python.org/pypi/xlwt"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"

LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~ppc-aix ~hppa-hpux ~ia64-hpux ~x86-interix ~x86-linux ~sparc-solaris ~x86-solaris"
IUSE="examples"

DEPEND=""
RDEPEND=""

python_unpack_all() {
	: echo " ### python_unpack_all ### (${@}) PYTHON=${PYTHON}"
	unpack ${A}	# Not needed
}

python_prepare_all() {
	: echo " ### python_prepare_all ### (${@}) PYTHON=${PYTHON}"
	sed -i \
		-e "s,'doc,# 'doc,g" \
		-e "s,'exa,# 'exa,g" \
		setup.py || die
}

python_prepare() {
	: echo " ### python_prepare ### (${@}) PYTHON=${PYTHON}"
}

python_configure() {
	: echo " ### python_configure ### (${@}) PYTHON=${PYTHON}"
}

python_compile() {
	: echo " ### python_compile ### (${@}) PYTHON=${PYTHON}"
	${PYTHON} setup.py build || die
}

python_test() {
	: echo " ### python_test ### (${@}) PYTHON=${PYTHON}"
}

python_install() {
	: echo " ### python_install ### (${@}) PYTHON=${PYTHON}"
	${PYTHON} setup.py install --no-compile --root="${D}/" || die
}

python_install_all() {
	: echo " ### python_install_all ### (${@}) PYTHON=${PYTHON}"
	dohtml xlwt/doc/*.html
	if use examples; then
		insinto "/usr/share/doc/${PF}"
		doins -r xlwt/examples
	fi
}