blob: 4fb2a626cb077f375bc2b440f492f57dd9086e40 (
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
|
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-python/jsonpickle/jsonpickle-0.3.1.ebuild,v 1.2 2010/11/06 22:45:56 arfrever Exp $
EAPI="3"
PYTHON_DEPEND="2"
SUPPORT_PYTHON_ABIS="1"
RESTRICT_PYTHON_ABIS="3.*"
inherit distutils
DESCRIPTION="Python library for serializing any arbitrary object graph into JSON."
HOMEPAGE="http://jsonpickle.github.com/ http://pypi.python.org/pypi/jsonpickle"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""
RDEPEND="|| ( dev-lang/python:2.7 dev-lang/python:2.6 dev-python/simplejson )"
DEPEND="${RDEPEND}
dev-python/setuptools"
src_prepare() {
distutils_src_prepare
# Fix exit status of runtests.py.
sed -e "s/unittest.TextTestRunner/return &/" -e "s/main()$/sys.exit(not main().wasSuccessful())/" -i tests/runtests.py || die "sed failed"
# thirdparty_tests.py requires dev-python/feedparser.
sed -e "/thirdparty_tests/d" -i tests/runtests.py || die "sed failed"
}
src_test() {
testing() {
PYTHONPATH="build-${PYTHON_ABI}/lib" "$(PYTHON)" tests/runtests.py
}
python_execute_function testing
}
|