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: Sat, 01 May 2021 07:45:11
Message-Id: 1619855099.8811937a33092a26b1d30cb04787fcccff5715c2.mgorny@gentoo
1 commit: 8811937a33092a26b1d30cb04787fcccff5715c2
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Sat May 1 06:36:44 2021 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Sat May 1 07:44:59 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8811937a
7
8 dev-python/pip: Bump to 21.1.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-21.1.1.ebuild | 120 +++++++++++++++++++++++++++++++++++++++
14 2 files changed, 121 insertions(+)
15
16 diff --git a/dev-python/pip/Manifest b/dev-python/pip/Manifest
17 index 8cba56a7e4a..ae748f84b12 100644
18 --- a/dev-python/pip/Manifest
19 +++ b/dev-python/pip/Manifest
20 @@ -1,4 +1,5 @@
21 DIST pip-21.0.1.tar.gz 8772082 BLAKE2B 2fdd78e2db8ceda2bd21fdeb4d29c0c2eda412827b87cc97ec1996a5b71b9c6e5938c0a6ef696163780bbbc55d81b8b3b1b6e2e79b05fbe9ce4bdd52e3ebdf13 SHA512 2db5397f4ca3a3f56f5add3f827bf1f0a4296019703438d68498266b9d2559b6baa3132061c5ad4c2a08bec6e76a2768763fdca02d86cf32aadd4640afbf3664
22 +DIST pip-21.1.1.tar.gz 8771867 BLAKE2B 1cb920ab52510e816a7c3b8b6d1b47576a27cf1b208ab8fefa102ff36c09eb4e99b34f213a043550a9e6fb37bb8b6306f9e939371661ff7f23ba03f21b4a643b SHA512 05157ed586597f16948afdad43d98cc095803d2d22b1427ac1028ca2a73a26d65e597446808194343ed36f9eb7cb910ac89e73a6a9a90ee868ec822fdbe641c5
23 DIST pip-21.1.tar.gz 8771224 BLAKE2B 2056a741b7f51d56c3984e2b0bcd1fa9cc12ba9677f80505fa5182fc0afad9c7dfe4ecf9429cf5ed5f8534f0a6a003b12455e90537a5dacbe188c8db548b71c3 SHA512 2617ae852cd52db980ab4131d711946b63930d30f480e050555bc61acb78577aa447b88065c6c8eba7e29c7167f78f04b11404cb0c1975caac464fa768ee7de8
24 DIST setuptools-51.3.3-py3-none-any.whl 786243 BLAKE2B cc8a98cdfd5cb78a342a3d50049c0ebd0965451e9bd4050b7a133346f505a17842a498531ade9bf932064a6cac81277ecf60d94ef94faa39b78740de87f9fd86 SHA512 1d4f29e392371b7f0e427d0570fddbdd1204f6c98e48a0a289db23b20f7c048551584ac946e30b90d720cce4f508b3c39208e9a70f87067d66734432963d141c
25 DIST setuptools-56.0.0-py3-none-any.whl 784941 BLAKE2B 136352bcaeeb803f94983db2e0f9ec79dacc23a6742a2f6f1b4bdd2b29a104f4965d78f9b4adf1a501c7bf39d4ed85a6786b03489f90872661afbf5e674fd3f9 SHA512 32405236e9c2936cde137bc4d4d07b548391336ce0511cd5677dcd1f85c7a142b0947e03cdceaeb37067874f5aa71daacaa1a6af95ae9fe3ad8af264f61e10f4
26
27 diff --git a/dev-python/pip/pip-21.1.1.ebuild b/dev-python/pip/pip-21.1.1.ebuild
28 new file mode 100644
29 index 00000000000..f6ec7e81791
30 --- /dev/null
31 +++ b/dev-python/pip/pip-21.1.1.ebuild
32 @@ -0,0 +1,120 @@
33 +# Copyright 1999-2021 Gentoo Authors
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI=7
37 +
38 +DISTUTILS_USE_SETUPTOOLS=rdepend
39 +PYTHON_COMPAT=( python3_{7..9} pypy3 )
40 +PYTHON_REQ_USE="ssl(+),threads(+)"
41 +
42 +inherit bash-completion-r1 distutils-r1
43 +
44 +# setuptools & wheel .whl files are required for testing,
45 +# the exact version is not very important.
46 +SETUPTOOLS_WHL="setuptools-56.0.0-py3-none-any.whl"
47 +WHEEL_WHL="wheel-0.36.2-py2.py3-none-any.whl"
48 +
49 +DESCRIPTION="Installs python packages -- replacement for easy_install"
50 +HOMEPAGE="
51 + https://pip.pypa.io/en/stable/
52 + https://pypi.org/project/pip/
53 + https://github.com/pypa/pip/"
54 +SRC_URI="
55 + https://github.com/pypa/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz
56 + test? (
57 + https://files.pythonhosted.org/packages/py3/s/setuptools/${SETUPTOOLS_WHL}
58 + https://files.pythonhosted.org/packages/py2.py3/w/wheel/${WHEEL_WHL}
59 + )
60 +"
61 +
62 +LICENSE="MIT"
63 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~sparc ~x86 ~x64-macos"
64 +SLOT="0"
65 +IUSE="test -vanilla"
66 +RESTRICT="!test? ( test )"
67 +
68 +RDEPEND="
69 + >=dev-python/setuptools-39.2.0[${PYTHON_USEDEP}]
70 +"
71 +BDEPEND="
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-20[${PYTHON_USEDEP}]
83 + dev-python/werkzeug[${PYTHON_USEDEP}]
84 + dev-python/wheel[${PYTHON_USEDEP}]
85 + )
86 +"
87 +
88 +python_prepare_all() {
89 + local PATCHES=(
90 + "${FILESDIR}/${PN}-21.1-no-coverage.patch"
91 + )
92 + if ! use vanilla; then
93 + PATCHES+=( "${FILESDIR}/pip-20.0.2-disable-system-install.patch" )
94 + fi
95 +
96 + distutils-r1_python_prepare_all
97 +
98 + if use test; then
99 + mkdir tests/data/common_wheels/ || die
100 + cp "${DISTDIR}"/{${SETUPTOOLS_WHL},${WHEEL_WHL}} \
101 + tests/data/common_wheels/ || die
102 + fi
103 +}
104 +
105 +python_test() {
106 + if [[ ${EPYTHON} == pypy* ]]; then
107 + ewarn "Skipping tests on ${EPYTHON} since they are very broken"
108 + return 0
109 + fi
110 +
111 + local deselect=(
112 + tests/functional/test_install.py::test_double_install_fail
113 + tests/functional/test_list.py::test_multiple_exclude_and_normalization
114 + 'tests/unit/test_commands.py::test_index_group_handle_pip_version_check[False-False-True-download]'
115 + 'tests/unit/test_commands.py::test_index_group_handle_pip_version_check[False-False-True-install]'
116 + 'tests/unit/test_commands.py::test_index_group_handle_pip_version_check[False-False-True-list]'
117 + 'tests/unit/test_commands.py::test_index_group_handle_pip_version_check[False-False-True-wheel]'
118 + tests/functional/test_install.py::test_install_pip_does_not_modify_pip_when_satisfied
119 + # Internet
120 + tests/functional/test_install.py::test_install_editable_with_prefix_setup_cfg
121 + )
122 +
123 + distutils_install_for_testing --via-root
124 +
125 + local -x GENTOO_PIP_TESTING=1 \
126 + PATH="${TEST_DIR}/scripts:${PATH}" \
127 + PYTHONPATH="${TEST_DIR}/lib:${BUILD_DIR}/lib"
128 + epytest ${deselect[@]/#/--deselect } -m "not network"
129 +}
130 +
131 +python_install_all() {
132 + # Prevent dbus auto-launch
133 + # https://bugs.gentoo.org/692178
134 + export DBUS_SESSION_BUS_ADDRESS="disabled:"
135 +
136 + local DOCS=( AUTHORS.txt docs/html/**/*.rst )
137 + distutils-r1_python_install_all
138 +
139 + COMPLETION="${T}"/completion.tmp
140 +
141 + # 'pip completion' command embeds full $0 into completion script, which confuses
142 + # 'complete' and causes QA warning when running as "${PYTHON} -m pip".
143 + # This trick sets correct $0 while still calling just installed pip.
144 + local pipcmd='import sys; sys.argv[0] = "pip"; from pip._internal.cli.main import main; sys.exit(main())'
145 +
146 + ${PYTHON} -c "${pipcmd}" completion --bash > "${COMPLETION}" || die
147 + newbashcomp "${COMPLETION}" ${PN}
148 +
149 + ${PYTHON} -c "${pipcmd}" completion --zsh > "${COMPLETION}" || die
150 + insinto /usr/share/zsh/site-functions
151 + newins "${COMPLETION}" _pip
152 +}