1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
6 PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} ) # Tests crash with pypy
8 inherit distutils-r1 flag-o-matic prefix
10 DESCRIPTION="Tools for generating printable PDF documents from any data source"
11 HOMEPAGE="http://www.reportlab.com/"
12 SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz
13 http://www.reportlab.com/ftp/fonts/pfbfer-20070710.zip"
17 KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux"
21 >=dev-python/pillow-2.4.0[tiff,truetype,jpeg,${PYTHON_USEDEP}]
22 media-libs/libart_lgpl
26 >=dev-python/setuptools-2.2[${PYTHON_USEDEP}]
31 "${FILESDIR}"/reportlab-no-pip.patch
36 cd ${P}/src/reportlab/fonts || die
37 unpack pfbfer-20070710.zip
40 python_prepare_all() {
42 -e 's|/usr/local/Acrobat|/opt/Acrobat|g' \
43 -e 's|%(HOME)s/fonts|%(HOME)s/.fonts|g' \
44 src/reportlab/rl_config.py || die
47 distutils-r1_python_prepare_all
50 python_compile_all() {
51 use doc && emake -C docs html
55 if ! python_is_python3; then
56 local -x CFLAGS="${CFLAGS} -fno-strict-aliasing"
58 distutils-r1_python_compile
62 pushd tests > /dev/null || die
63 "${PYTHON}" runAll.py || die "Testing failed with ${EPYTHON}"
64 popd > /dev/null || die
67 python_install_all() {
68 use doc && local HTML_DOCS=( docs/build/html/. )
69 use examples && local EXAMPLES=( demos/. tools/pythonpoint/demos )
71 distutils-r1_python_install_all