1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
5 PYTHON_COMPAT=( python2_7 python3_{5,6,7} 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="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x64-cygwin ~amd64-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
18 DESCRIPTION="Collection of extensions to Distutils"
19 HOMEPAGE="https://github.com/pypa/setuptools https://pypi.org/project/setuptools/"
24 RESTRICT="!test? ( test )"
31 dev-python/mock[${PYTHON_USEDEP}]
32 dev-python/pip[${PYTHON_USEDEP}]
33 >=dev-python/pytest-3.7.0[${PYTHON_USEDEP}]
35 dev-python/pytest-fixture-config[${PYTHON_USEDEP}]
36 dev-python/pytest-virtualenv[${PYTHON_USEDEP}]
37 dev-python/wheel[${PYTHON_USEDEP}]
38 virtual/python-futures[${PYTHON_USEDEP}]
42 >=dev-python/certifi-2016.9.26[${PYTHON_USEDEP}]"
44 # Force in-source build because build system modifies sources.
45 DISTUTILS_IN_SOURCE_BUILD=1
47 DOCS=( {CHANGES,README}.rst docs/{easy_install.txt,pkg_resources.txt,setuptools.txt} )
49 python_prepare_all() {
50 if [[ ${PV} == "9999" ]]; then
52 ${EPYTHON} bootstrap.py || die
55 # disable tests requiring a network connection
56 rm setuptools/tests/test_packageindex.py || die
58 # don't run integration tests
59 rm setuptools/tests/test_integration.py || die
61 distutils-r1_python_prepare_all
65 # test_easy_install raises a SandboxViolation due to ${HOME}/.pydistutils.cfg
66 # It tries to sandbox the test in a tempdir
67 HOME="${PWD}" pytest -vv ${PN} || die "Tests failed under ${EPYTHON}"
71 export DISTRIBUTE_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT=1
72 distutils-r1_python_install