blob: 3936edf564c049bc138808a07b3724d3a34876cf (
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
|
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-python/cython/cython-0.12.ebuild,v 1.8 2010/02/07 20:47:14 pva Exp $
EAPI="2"
SUPPORT_PYTHON_ABIS="1"
inherit eutils distutils flag-o-matic
MY_PN="Cython"
MY_P="${MY_PN}-${PV/_/.}"
DESCRIPTION="A language for writing Python extension modules based on pyrex"
HOMEPAGE="http://www.cython.org/ http://pypi.python.org/pypi/Cython"
SRC_URI="http://pypi.python.org/packages/source/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz
http://www.cython.org/release/${MY_P}.tar.gz"
LICENSE="PSF-2.4"
SLOT="0"
KEYWORDS="amd64 ~arm hppa ~ia64 ppc ~ppc64 ~sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~x64-solaris ~x86-solaris"
IUSE="doc examples"
DEPEND=""
RDEPEND=""
S="${WORKDIR}/${MY_P}"
PYTHON_MODNAME="${MY_PN} pyximport"
DOCS="ToDo.txt USAGE.txt"
src_prepare() {
distutils_src_prepare
epatch "${FILESDIR}/${P}-report_test_failures.patch"
}
src_test() {
testing() {
# Tests fail with Python 3 due to bug in Python.
# http://bugs.python.org/issue7173
[[ "${PYTHON_ABI}" == 3.* ]] && return
rm -fr BUILD
# Tests sometimes hang with forking enabled.
"$(PYTHON)" runtests.py --no-fork -vv
}
python_execute_function testing
}
src_install() {
distutils_src_install
# '-A c' is for ignoring of Doc/primes.c.
use doc && dohtml -A c -r Doc/*
if use examples; then
# Demos/ has files with .so,~ suffixes.
# So we have to specify precisely what to install.
insinto /usr/share/doc/${PF}/examples
doins Demos/Makefile* Demos/setup.py Demos/*.{py,pyx}
fi
}
|