48 lines
1 KiB
Bash
48 lines
1 KiB
Bash
# Copyright 1999-2017 Gentoo Foundation
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
EAPI=6
|
|
|
|
PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
|
|
|
|
inherit distutils-r1
|
|
MYPN=Glymur
|
|
MYP=${MYPN}-${PV}
|
|
|
|
DESCRIPTION="Python tools for accessing JPEG2000 files"
|
|
HOMEPAGE="https://github.com/quintusdias/glymur"
|
|
SRC_URI="mirror://pypi/${MYPN:0:1}/${MYPN}/${MYP}.tar.gz"
|
|
|
|
LICENSE="MIT"
|
|
SLOT="0"
|
|
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
|
|
IUSE="doc"
|
|
|
|
RDEPEND="
|
|
dev-python/contextlib2[${PYTHON_USEDEP}]
|
|
dev-python/lxml[${PYTHON_USEDEP}]
|
|
dev-python/numpy[${PYTHON_USEDEP}]
|
|
media-libs/openjpeg:2=
|
|
"
|
|
DEPEND="${RDEPEND}
|
|
dev-python/setuptools[${PYTHON_USEDEP}]
|
|
doc? (
|
|
dev-python/mock[${PYTHON_USEDEP}]
|
|
dev-python/sphinx[${PYTHON_USEDEP}]
|
|
dev-python/sphinx_rtd_theme[${PYTHON_USEDEP}]
|
|
dev-python/numpydoc[${PYTHON_USEDEP}]
|
|
)
|
|
"
|
|
|
|
S="${WORKDIR}/${MYP}"
|
|
|
|
python_compile_all() {
|
|
if use doc; then
|
|
emake -C docs html
|
|
HTML_DOCS=( docs/build/html/. )
|
|
fi
|
|
}
|
|
|
|
python_test() {
|
|
"${EPYTHON}" -m unittest discover || die
|
|
}
|