1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
5 PYTHON_COMPAT=( python2_7 python3_{4,5,6} pypy{,3} )
6 PYTHON_REQ_USE="xml(+)"
10 if [[ ${PV} == "9999" ]]; then
11 EGIT_REPO_URI="https://github.com/pypa/setuptools.git"
14 SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.zip"
15 KEYWORDS="~amd64 ~ia64 ~ppc ~ppc64 ~x86"
18 DESCRIPTION="Collection of extensions to Distutils"
19 HOMEPAGE="https://github.com/pypa/setuptools https://pypi.python.org/pypi/setuptools"
30 dev-python/pip[${PYTHON_USEDEP}]
31 >=dev-python/pytest-2.8[${PYTHON_USEDEP}]
32 dev-python/pytest-fixture-config[${PYTHON_USEDEP}]
33 dev-python/pytest-virtualenv[${PYTHON_USEDEP}]
34 >=dev-python/backports-unittest-mock-1.2[${PYTHON_USEDEP}]
38 >=dev-python/certifi-2016.9.26[${PYTHON_USEDEP}]"
40 # Force in-source build because build system modifies sources.
41 DISTUTILS_IN_SOURCE_BUILD=1
43 DOCS=( {CHANGES,README}.rst docs/{easy_install.txt,pkg_resources.txt,setuptools.txt} )
45 python_prepare_all() {
46 if [[ ${PV} == "9999" ]]; then
48 ${EPYTHON} bootstrap.py || die
51 # disable tests requiring a network connection
52 rm setuptools/tests/test_packageindex.py || die
54 # don't run integration tests
55 rm setuptools/tests/test_integration.py || die
57 distutils-r1_python_prepare_all
61 # test_easy_install raises a SandboxViolation due to ${HOME}/.pydistutils.cfg
62 # It tries to sandbox the test in a tempdir
63 HOME="${PWD}" py.test --verbose ${PN} || die "Tests failed under ${EPYTHON}"
67 export DISTRIBUTE_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT=1
68 distutils-r1_python_install