Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/pip/
Date: Thu, 30 Apr 2020 14:46:27
Message-Id: 1588257980.e3a0b9a9fb4eb379a2d80481a3c498f4373ec323.mgorny@gentoo
1 commit: e3a0b9a9fb4eb379a2d80481a3c498f4373ec323
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Thu Apr 30 07:49:21 2020 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Thu Apr 30 14:46:20 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e3a0b9a9
7
8 dev-python/pip: Bump to 20.1
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 dev-python/pip/Manifest | 1 +
13 dev-python/pip/pip-20.1.ebuild | 140 +++++++++++++++++++++++++++++++++++++++++
14 2 files changed, 141 insertions(+)
15
16 diff --git a/dev-python/pip/Manifest b/dev-python/pip/Manifest
17 index c1159161faf..f6e99d0a708 100644
18 --- a/dev-python/pip/Manifest
19 +++ b/dev-python/pip/Manifest
20 @@ -1,5 +1,6 @@
21 DIST pip-19.3.1.tar.gz 6409819 BLAKE2B b3aacd0bee60400a1f30b4be57871002072e5cc7a86e76cca1848e977ebdc85b6e282fc521c19bf7a518d1aef3280133fcd65a431cb2a16e202dd7721c5b97ad SHA512 39446c0ab6e4495d98f22923a2a76901b024d9047b60d92580b21d447a718e5285cfd66f8ad0c20befcfe1abc7f06be29b6a5644d1b30265d3b67399fe76e033
22 DIST pip-20.0.2.tar.gz 6445047 BLAKE2B 8f6e0a8908cf594c8d51818942b0839f59a495697a95dcc0347235e90cbe6d7f035f155761e7da9cfca1ba08b2c5a2c5def52c60c381f5428ef48efd1b6b5131 SHA512 f9965944ca0f319d01db1638ce97cf64772afff1778b3b1271155de73208cfcb3954d89a469c1143c0bf3288a53d4446165a49df994374b16ac6f7ffdae85857
23 +DIST pip-20.1.tar.gz 6500955 BLAKE2B 81ab806fce4ae3d9aeab34fe8781c13507252ef0325abb35dd739f3eaf0e648866b052d2adb8b187974ae784f493dbb83f684c464da8f9079f66fe8c4fa2d61d SHA512 19cc1172540bec4b0c6facf55fa9c463bf8f4391dd1a643ac208c8e0b787950b2d72a6ec8f0772c7e6582c6b6a4a103f31ad58ffa2119fb574c174e5ec77b0c1
24 DIST pip-9.0.1.tar.gz 1197370 BLAKE2B 3618161690d5e0a38d141f9b51baea4aaa3fdc225664ef180bbeecf6e2df95e9ea4f97c63fe3a68f84f4fb5ebcc74e316827253c7e07b03565e58113bbaa918a SHA512 ee59efb4b009ff6543b7afdea99b9cbbee1981ecc03af586acda76674024d3b66dab23049e68f3da9448734984619fc1eaba6e965c9dd3d731973376c8a42e25
25 DIST setuptools-41.4.0-py2.py3-none-any.whl 580302 BLAKE2B 58dc2d48445406f7467bfb0934dc507e8a569e4759bfcc95287cfb21b5b1a7bcab061656a29a8b4976ee3ae12a3adca570035ae4a6d9df09ae7a799857775d36 SHA512 a27b38d596931dfef81d705d05689b7748ce0e02d21af4a37204fc74b0913fa7241b8135535eb7749f09af361cad90c475af98493fef11c4ad974780ee01243d
26 DIST setuptools-44.0.0-py2.py3-none-any.whl 583230 BLAKE2B 823e6792471660f247e30a938aa869d345a63db7294e5f9b4bd88f15a7694779011d29740fe317149620985f705fc6e18cbb07a18e5680cc11d7c229ffbc74f6 SHA512 7006fd303181afbeeec0e30cafb9fd1e4d3c6f55cfdd6343fedbc32b17dbb96b3d96ae37f4db27bfb168738727474cf425904ec280ff1d2b789fc48077a8fa84
27
28 diff --git a/dev-python/pip/pip-20.1.ebuild b/dev-python/pip/pip-20.1.ebuild
29 new file mode 100644
30 index 00000000000..99ae4f7dca1
31 --- /dev/null
32 +++ b/dev-python/pip/pip-20.1.ebuild
33 @@ -0,0 +1,140 @@
34 +# Copyright 1999-2020 Gentoo Authors
35 +# Distributed under the terms of the GNU General Public License v2
36 +
37 +EAPI=7
38 +
39 +DISTUTILS_USE_SETUPTOOLS=rdepend
40 +PYTHON_COMPAT=( python2_7 python3_{6,7,8} pypy3 )
41 +PYTHON_REQ_USE="ssl(+),threads(+)"
42 +
43 +inherit bash-completion-r1 distutils-r1 multiprocessing
44 +
45 +SETUPTOOLS_PV="44.0.0"
46 +WHEEL_PV="0.34.2"
47 +
48 +DESCRIPTION="Installs python packages -- replacement for easy_install"
49 +HOMEPAGE="https://pip.pypa.io/ https://pypi.org/project/pip/ https://github.com/pypa/pip/"
50 +SRC_URI="
51 + https://github.com/pypa/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz
52 + test? (
53 + https://files.pythonhosted.org/packages/py2.py3/s/setuptools/setuptools-${SETUPTOOLS_PV}-py2.py3-none-any.whl
54 + https://files.pythonhosted.org/packages/py2.py3/w/wheel/wheel-${WHEEL_PV}-py2.py3-none-any.whl
55 + )
56 +"
57 +# PyPI archive does not have tests, so we need to download from GitHub.
58 +# setuptools & wheel .whl files are required for testing, exact version is not very important.
59 +
60 +LICENSE="MIT"
61 +KEYWORDS="~amd64 ~x86"
62 +SLOT="0"
63 +IUSE="test -vanilla"
64 +
65 +# disable-system-install patch breaks tests
66 +RESTRICT="!test? ( test )"
67 +
68 +RDEPEND="
69 + >=dev-python/setuptools-39.2.0[${PYTHON_USEDEP}]
70 +"
71 +DEPEND="
72 + ${RDEPEND}
73 + test? (
74 + dev-python/cryptography[${PYTHON_USEDEP}]
75 + dev-python/csv23[${PYTHON_USEDEP}]
76 + dev-python/freezegun[${PYTHON_USEDEP}]
77 + dev-python/mock[${PYTHON_USEDEP}]
78 + dev-python/pretend[${PYTHON_USEDEP}]
79 + dev-python/pytest[${PYTHON_USEDEP}]
80 + dev-python/pyyaml[${PYTHON_USEDEP}]
81 + dev-python/scripttest[${PYTHON_USEDEP}]
82 + dev-python/virtualenv[${PYTHON_USEDEP}]
83 + dev-python/werkzeug[${PYTHON_USEDEP}]
84 + dev-python/wheel[${PYTHON_USEDEP}]
85 + $(python_gen_cond_dep 'dev-python/enum34[${PYTHON_USEDEP}]' -2)
86 + )
87 +"
88 +
89 +python_prepare_all() {
90 + local PATCHES=(
91 + "${FILESDIR}/${PN}-19.3-disable-version-check.patch"
92 + )
93 + if ! use vanilla; then
94 + PATCHES+=( "${FILESDIR}/pip-20.0.2-disable-system-install.patch" )
95 + fi
96 + distutils-r1_python_prepare_all
97 +
98 + if use test; then
99 + mkdir tests/data/common_wheels/ || die
100 + cp "${DISTDIR}"/setuptools-${SETUPTOOLS_PV}-py2.py3-none-any.whl \
101 + tests/data/common_wheels/ || die
102 +
103 + cp "${DISTDIR}"/wheel-${WHEEL_PV}-py2.py3-none-any.whl \
104 + tests/data/common_wheels/ || die
105 + fi
106 +}
107 +
108 +python_test() {
109 + if [[ ${EPYTHON} == pypy* ]]; then
110 + ewarn "Skipping tests on ${EPYTHON} since they are very broken"
111 + return 0
112 + fi
113 +
114 + local -a exclude_tests
115 +
116 + # these will be built in to an expression passed to pytest to exclude
117 + exclude_tests=(
118 + git
119 + svn
120 + bazaar
121 + mercurial
122 + version_check
123 + uninstall_non_local_distutils
124 + pep518_uses_build_env
125 + install_package_with_root
126 + install_editable_with_prefix
127 + install_user_wheel
128 + install_from_current_directory_into_usersite
129 + uninstall_editable_from_usersite
130 + uninstall_from_usersite_with_dist_in_global_site
131 + build_env_isolation
132 + user_config_accepted
133 + )
134 +
135 + distutils_install_for_testing
136 +
137 + # generate the expression to exclude failing tests
138 + local exclude_expr
139 + printf -v exclude_expr "or %s " "${exclude_tests[@]}" || die
140 + exclude_expr="not (${exclude_expr#or })" || die
141 +
142 + local -x GENTOO_PIP_TESTING=1 \
143 + PATH="${TEST_DIR}/scripts:${PATH}" \
144 + PYTHONPATH="${TEST_DIR}/lib:${BUILD_DIR}/lib"
145 +
146 + pytest -vv \
147 + -k "${exclude_expr}" \
148 + -m "not network" \
149 + || die "Tests fail with ${EPYTHON}"
150 +}
151 +
152 +python_install_all() {
153 + # Prevent dbus auto-launch
154 + # https://bugs.gentoo.org/692178
155 + export DBUS_SESSION_BUS_ADDRESS="disabled:"
156 +
157 + local DOCS=( AUTHORS.txt docs/html/**/*.rst )
158 + distutils-r1_python_install_all
159 +
160 + COMPLETION="${T}"/completion.tmp
161 +
162 + # 'pip completion' command embeds full $0 into completion script, which confuses
163 + # 'complete' and causes QA warning when running as "${PYTHON} -m pip".
164 + # This trick sets correct $0 while still calling just installed pip.
165 + local pipcmd='import sys; sys.argv[0] = "pip"; import pip.__main__; sys.exit(pip.__main__._main())'
166 +
167 + ${PYTHON} -c "${pipcmd}" completion --bash > "${COMPLETION}" || die
168 + newbashcomp "${COMPLETION}" ${PN}
169 +
170 + ${PYTHON} -c "${pipcmd}" completion --zsh > "${COMPLETION}" || die
171 + insinto /usr/share/zsh/site-functions
172 + newins "${COMPLETION}" _pip
173 +}