1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
7 PYTHON_COMPAT=( python{2_7,3_4,3_5} pypy pypy3 )
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"
14 SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${MY_P}.tar.gz"
16 S="${WORKDIR}/${MY_P}"
18 # MIT license is used by included (modified) iso8601.py code.
24 # Depend on an ebuild of translationstring with Python 3 support.
25 RDEPEND=">=dev-python/translationstring-1.1[${PYTHON_USEDEP}]"
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}] )"
33 # Include COPYRIGHT.txt because the license seems to require it.
34 DOCS=( CHANGES.rst COPYRIGHT.txt README.rst )
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
40 distutils-r1_python_prepare_all
43 python_compile_all() {
45 # https://github.com/Pylons/colander/issues/38
46 emake -C docs html SPHINXOPTS=""
51 nosetests || die "Tests fail with ${EPYTHON}"
54 python_install_all() {
55 use doc && local HTML_DOCS=( docs/_build/html/. )
56 distutils-r1_python_install_all