dev-python/colander: x86 stable wrt bug #606026
[gentoo.git] / dev-python / colander / colander-1.3.1.ebuild
1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI=5
6
7 PYTHON_COMPAT=( python{2_7,3_4,3_5} pypy pypy3 )
8
9 inherit distutils-r1
10
11 DESCRIPTION="A simple schema-based serialization and deserialization library"
12 HOMEPAGE="http://docs.pylonsproject.org/projects/colander/en/latest/ https://pypi.python.org/pypi/colander"
13 MY_P=${P/_beta1/b1}
14 SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${MY_P}.tar.gz"
15
16 S="${WORKDIR}/${MY_P}"
17
18 # MIT license is used by included (modified) iso8601.py code.
19 LICENSE="repoze MIT"
20 SLOT="0"
21 KEYWORDS="amd64 x86"
22 IUSE="doc test"
23
24 # Depend on an ebuild of translationstring with Python 3 support.
25 RDEPEND=">=dev-python/translationstring-1.1[${PYTHON_USEDEP}]"
26
27 DEPEND="${RDEPEND}
28         dev-python/setuptools[${PYTHON_USEDEP}]
29         doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
30         test? ( dev-python/nose[${PYTHON_USEDEP}]
31                 dev-python/iso8601[${PYTHON_USEDEP}] )"
32
33 # Include COPYRIGHT.txt because the license seems to require it.
34 DOCS=( CHANGES.rst COPYRIGHT.txt README.rst )
35
36 python_prepare_all() {
37         # Remove pylons theme since it's not included in source
38         sed -e "/# Add and use Pylons theme/,+37d" -i docs/conf.py || die
39
40         distutils-r1_python_prepare_all
41 }
42
43 python_compile_all() {
44         if use doc; then
45                 # https://github.com/Pylons/colander/issues/38
46                 emake -C docs html SPHINXOPTS=""
47         fi
48 }
49
50 python_test() {
51         nosetests || die "Tests fail with ${EPYTHON}"
52 }
53
54 python_install_all() {
55         use doc && local HTML_DOCS=( docs/_build/html/. )
56         distutils-r1_python_install_all
57 }