1 # Copyright 1999-2018 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
6 PYTHON_COMPAT=( python2_7 python3_{4,5,6} pypy )
7 PYTHON_REQ_USE="threads(+)"
9 inherit eutils bash-completion-r1 distutils-r1
11 DESCRIPTION="Installs python packages -- replacement for easy_install"
12 HOMEPAGE="https://pip.pypa.io/ https://pypi.python.org/pypi/pip/ https://github.com/pypa/pip/"
13 SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
16 KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 sparc x86 ~amd64-linux ~x86-linux"
19 # Check pip/_vendor/vendor.txt for this
21 # >=dev-python/distlib-0.2.2[${PYTHON_USEDEP}]
22 # >=dev-python/html5lib-1.0b8[${PYTHON_USEDEP}]
23 # >=dev-python/six-1.10.0${PYTHON_USEDEP}]
24 # >=dev-python/colorama-0.3.6[${PYTHON_USEDEP}]
25 # >=dev-python/requests-2.9.1-r2[${PYTHON_USEDEP}]
26 # >=dev-python/CacheControl-0.11.6[${PYTHON_USEDEP}]
27 # >=dev-python/lockfile-0.12.2[${PYTHON_USEDEP}]
28 # >=dev-python/progress-1.2[${PYTHON_USEDEP}]
29 # >=dev-python/packaging-16.5[${PYTHON_USEDEP}]
30 # >=dev-python/retrying-1.3.3[${PYTHON_USEDEP}]
31 # >=dev-python/pyparsing-2.1.0[${PYTHON_USEDEP}]
32 # virtual/python-ipaddress[${PYTHON_USEDEP}]
34 # https://github.com/pypa/pip/issues/3057
35 #RDEPEND="${VENDOR_DEPEND}
36 # >=dev-python/setuptools-19.2[${PYTHON_USEDEP}]
37 # <dev-python/setuptools-19.4[${PYTHON_USEDEP}]
41 # required test data isn't bundled with the tarball
45 # "${FILESDIR}"/${PN}-6.0.2-disable-version-check.patch
46 # "${FILESDIR}"/${PN}-8.0.0-unbundle.patch
49 #python_prepare_all() {
50 # mv pip/_vendor/__init__.py "${T}" || die
51 # rm -r pip/_vendor/* || die
52 # mv "${T}"/__init__.py pip/_vendor/__init__.py || die
54 # distutils-r1_python_prepare_all
57 DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
61 "${FILESDIR}/pip-disable-system-install.patch"
62 "${FILESDIR}/${PN}-9.0.1-disable-version-check.patch"
65 python_install_all() {
66 local DOCS=( AUTHORS.txt docs/*.rst )
67 distutils-r1_python_install_all
69 COMPLETION="${T}"/completion.tmp
71 "${PYTHON}" -m pip completion --bash > "${COMPLETION}" || die
72 newbashcomp "${COMPLETION}" ${PN}
74 "${PYTHON}" -m pip completion --zsh > "${COMPLETION}" || die
75 insinto /usr/share/zsh/site-functions
76 newins "${COMPLETION}" _pip