summaryrefslogtreecommitdiff
blob: ce51233dceb769edec5248f3cc7aa510236a86a9 (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
# Copyright 1999-2004 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-python/generator/generator-1.0.1.ebuild,v 1.2 2004/01/19 13:17:48 lanius Exp $
SLOT="0"
IUSE=""
DESCRIPTION="Widget generator for Archetypes"
HOMEPAGE="http://www.sourceforge.net/projects/archetypes"
SRC_PN=archetypes
SRC_PV=1.0.1
SRC_P=${SRC_PN}-${SRC_PV}
SRC_URI="mirror://sourceforge/${SRC_PN}/${SRC_P}.tgz"
S=${WORKDIR}/${SRC_P}/${PN}
LICENSE="GPL-2"
KEYWORDS="~x86"
if [ "${PYTHON_SLOT_VERSION}" = 'VIRTUAL' ] ; then
	RDEPEND="virtual/python"
else
	RDEPEND="dev-lang/python"
fi
DEPEND="${RDEPEND}"

src_install() {
	local python=""
	if [ "${PYTHON_SLOT_VERSION}" = 'VIRTUAL' ] ; then
		python='python'
		einfo "Building with virtual python"
	else
		if has_version '=dev-lang/python-2.1*'; then
			python="${python} python2.1"
			einfo "Building with Python 2.1"
		fi
		if has_version '=dev-lang/python-2.2*'; then
			python="${python} python2.2"
			einfo "Building with Python 2.2"
		fi
	fi

	for i in ${python}; do
		$i setup.py clean
		# ok, so this actually compiles them here, but it was the only way I could find to 
		# compile both versions
		$i setup.py build install --prefix=${D}/usr || die
	done;
	dodoc ChangeLog PKG-INFO README
}