summaryrefslogtreecommitdiff
blob: ce8595bd7ede0fdeba662ef3303f77dd7040ebe4 (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-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-python/apse/apse-0.2-r3.ebuild,v 1.10 2015/04/14 12:49:15 ago Exp $

EAPI=5
PYTHON_COMPAT=( python2_7 pypy )

inherit distutils-r1

MY_P="Apse-${PV}"

DESCRIPTION="Approximate String Matching in Python"
HOMEPAGE="http://www.personal.psu.edu/staff/i/u/iua1/python/apse/"
SRC_URI="http://www.personal.psu.edu/staff/i/u/iua1/python/${PN}/dist/${MY_P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 ia64 ppc ppc64 x86"
IUSE=""

RDEPEND=""
DEPEND="dev-lang/swig:1"

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

python_prepare_all() {
	# Prevent the build system from calling swig over and over again.
	sed -i -e 's:Apse.i:Apse_wrap.c:' setup.py || die

	distutils-r1_python_prepare_all
}

python_configure_all() {
	set -- swig1.3 -python -o Apse_wrap.c Apse.i
	echo "${@}" >&2
	"${@}" || die
}

python_test() {
	"${PYTHON}" test/test_Apse.py || die "Tests fail with ${EPYTHON}"
}