1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 PYTHON_COMPAT=( pypy3 python{2_7,3_{6,7}} )
10 DESCRIPTION="Discover and load entry points from installed packages"
11 HOMEPAGE="https://github.com/takluyver/entrypoints"
12 SRC_URI="https://github.com//takluyver/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
16 KEYWORDS="amd64 ~arm ~arm64 x86"
18 RESTRICT="!test? ( test )"
21 dev-python/setuptools[${PYTHON_USEDEP}]
22 $(python_gen_cond_dep '>=dev-python/configparser-3.5.0[${PYTHON_USEDEP}]' 'python2*')
24 dev-python/pytest[${PYTHON_USEDEP}]
25 virtual/python-pathlib[${PYTHON_USEDEP}]
27 doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
31 "${FILESDIR}/${P}"-setup.py.patch
32 "${FILESDIR}/${PN}"-0.2.1-init.py.patch
35 python_prepare_all() {
36 # Prevent un-needed download during build
38 sed -e "/^ 'sphinx.ext.intersphinx',/d" -i doc/conf.py || die
41 distutils-r1_python_prepare_all
43 mv "${WORKDIR}/${P}"/entrypoints.py "${WORKDIR}/${P}/${PN}/" || die
46 python_compile_all() {
49 HTML_DOCS=( doc/_build/html/. )
54 distutils_install_for_testing
55 cd "${TEST_DIR}"/lib || die
56 cp -r "${S}"/tests "${TEST_DIR}"/lib/ || die