1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
5 PYTHON_COMPAT=( python3_{6,7,8} )
9 if [ "${PV}" == "9999" ]; then
11 EGIT_REPO_URI="https://github.com/python/${PN}"
14 TYPESHED_COMMIT="a06abc5"
15 SRC_URI="https://github.com/python/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz
16 https://api.github.com/repos/python/typeshed/tarball/${TYPESHED_COMMIT} -> mypy-typeshed-${PV}-${TYPESHED_COMMIT}.tar.gz"
19 DESCRIPTION="Optional static typing for Python"
20 HOMEPAGE="http://www.mypy-lang.org/"
28 dev-python/setuptools[${PYTHON_USEDEP}]
29 test? ( dev-python/flake8[${PYTHON_USEDEP}] )
31 dev-python/sphinx[${PYTHON_USEDEP}]
32 dev-python/sphinx_rtd_theme[${PYTHON_USEDEP}]
37 >=dev-python/psutil-4[${PYTHON_USEDEP}]
38 >=dev-python/typed-ast-1.4.0[${PYTHON_USEDEP}]
39 <dev-python/typed-ast-1.5.0[${PYTHON_USEDEP}]
40 >=dev-python/typing-extensions-3.7.4[${PYTHON_USEDEP}]
41 >=dev-python/mypy_extensions-0.4.3[${PYTHON_USEDEP}]
42 <dev-python/mypy_extensions-0.5.0[${PYTHON_USEDEP}]
47 RESTRICT="!test? ( test )"
50 if [ "${PV}" == "9999" ]; then
54 rmdir "${S}/mypy/typeshed"
55 mv "${WORKDIR}/python-typeshed-${TYPESHED_COMMIT}" "${S}/mypy/typeshed"
59 python_compile_all() {
60 use doc && emake -C docs html
64 local PYTHONPATH="$(pwd)"
66 "${PYTHON}" runtests.py || die "tests failed under ${EPYTHON}"
69 python_install_all() {
70 use doc && local HTML_DOCS=( docs/build/html/. )
72 distutils-r1_python_install_all