summaryrefslogtreecommitdiff
blob: 72eb67c81ef72b42c3256d52c92e1bf82d03c108 (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
67
68
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-python/pylons/pylons-0.9.4.1-r1.ebuild,v 1.2 2007/07/04 20:19:28 lucass Exp $

NEED_PYTHON=2.3

inherit distutils

KEYWORDS="~amd64 ~x86"

MY_PN=Pylons
MY_P=${MY_PN}-${PV}

DESCRIPTION="A lightweight web framework emphasizing flexibility and rapid development."
HOMEPAGE="http://pylonshq.com"
SRC_URI="http://cheeseshop.python.org/packages/source/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
LICENSE="BSD"
SLOT="0"
IUSE="doc"

RDEPEND=">=dev-python/routes-1.6.2
	>=dev-python/webhelpers-0.2.2
	>=dev-python/beaker-0.6.2
	>=dev-python/paste-1.1.1
	>=dev-python/pastedeploy-1.0
	>=dev-python/pastescript-1.0
	>=dev-python/myghty-1.1
	>=dev-python/formencode-0.6
	>=dev-python/simplejson-1.4
	>=dev-python/nose-0.9.1"
DEPEND="${RDEPEND}
	dev-python/setuptools
	doc? ( dev-python/pudge dev-python/buildutils )"

# The tests fail, needs further investigation
RESTRICT="test"

S="${WORKDIR}/${MY_P}"

src_unpack() {
	distutils_src_unpack

	sed -i \
		-e 's|dest =.*|dest = docs/html|' \
		setup.cfg || die "sed failed"
}

src_compile() {
	distutils_src_compile
	if use doc ; then
		einfo "Generating docs as requested..."
		"${python}" setup.py pudge || die "generating docs failed"
	fi
}

src_install() {
	distutils_src_install
	use doc && dohtml -r docs/html/*
}

pkg_postinst() {
	elog "pylons can make use of many other packages like:"
	elog " cheetah, genshi, kid or pudge"
}

src_test() {
	PYTHONPATH=. "${python}" setup.py nosetests || die "tests failed"
}