net-irc/irssi-1.0.7-r0: alpha stable
[gentoo.git] / dev-python / pip / pip-9.0.1-r1.ebuild
1 # Copyright 1999-2018 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 PYTHON_COMPAT=( python2_7 python3_{4,5,6} pypy )
7 PYTHON_REQ_USE="threads(+)"
8
9 inherit eutils bash-completion-r1 distutils-r1
10
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"
14
15 LICENSE="MIT"
16 KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 sparc x86 ~amd64-linux ~x86-linux"
17 SLOT="0"
18
19 # Check pip/_vendor/vendor.txt for this
20 #VENDOR_DEPEND="
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}]
33 #"
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}]
38 #"
39 #DEPEND="${RDEPEND}"
40
41 # required test data isn't bundled with the tarball
42 RESTRICT="test"
43
44 #PATCHES=(
45 #       "${FILESDIR}"/${PN}-6.0.2-disable-version-check.patch
46 #       "${FILESDIR}"/${PN}-8.0.0-unbundle.patch
47 #       )
48
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
53 #
54 #       distutils-r1_python_prepare_all
55 #}
56
57 DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
58 RDEPEND="${DEPEND}"
59
60 PATCHES=(
61         "${FILESDIR}/pip-disable-system-install.patch"
62         "${FILESDIR}/${PN}-9.0.1-disable-version-check.patch"
63 )
64
65 python_install_all() {
66         local DOCS=( AUTHORS.txt docs/*.rst )
67         distutils-r1_python_install_all
68
69         COMPLETION="${T}"/completion.tmp
70
71         "${PYTHON}" -m pip completion --bash > "${COMPLETION}" || die
72         newbashcomp "${COMPLETION}" ${PN}
73
74         "${PYTHON}" -m pip completion --zsh > "${COMPLETION}" || die
75         insinto /usr/share/zsh/site-functions
76         newins "${COMPLETION}" _pip
77 }