1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 PYTHON_COMPAT=( python3_6 )
9 DESCRIPTION="Astronomical routines for the python programming language"
10 HOMEPAGE="https://rhodesmill.org/pyephem/"
11 SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
15 KEYWORDS="amd64 ~ppc x86 ~amd64-linux ~x86-linux"
18 DEPEND="doc? ( dev-python/sphinx )"
21 RESTRICT="!test? ( test )"
24 # don't install rst files by dfefault
25 sed -i -e "s:'doc/\*\.rst',::" setup.py || die
26 distutils-r1_src_prepare
30 distutils-r1_src_compile
32 PYTHONPATH=. emake -C ephem/doc html
37 PYTHONPATH="$(ls -d ${BUILD_DIR}/lib*)" unit2 discover -s ephem
41 use doc && HTML_DOCS=( ephem/doc/_build/html/. )
42 distutils-r1_src_install
45 rm -r "${D}$(python_get_sitedir)/ephem/tests" || die
47 python_foreach_impl delete_tests