Gentoo Archives: gentoo-commits

From: Arthur Zamarin <arthurzam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/pip/
Date: Thu, 04 Aug 2022 17:55:41
Message-Id: 1659635698.37980882a673171d1cbbc70de5f0ddd40a59d943.arthurzam@gentoo
1 commit: 37980882a673171d1cbbc70de5f0ddd40a59d943
2 Author: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
3 AuthorDate: Thu Aug 4 17:48:31 2022 +0000
4 Commit: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
5 CommitDate: Thu Aug 4 17:54:58 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=37980882
7
8 dev-python/pip: add 22.2.2
9
10 Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>
11
12 dev-python/pip/Manifest | 1 +
13 dev-python/pip/pip-22.2.2.ebuild | 136 +++++++++++++++++++++++++++++++++++++++
14 2 files changed, 137 insertions(+)
15
16 diff --git a/dev-python/pip/Manifest b/dev-python/pip/Manifest
17 index 126c95ac5d6f..d45ad2c97c73 100644
18 --- a/dev-python/pip/Manifest
19 +++ b/dev-python/pip/Manifest
20 @@ -1,5 +1,6 @@
21 DIST pip-22.1.2.gh.tar.gz 9346675 BLAKE2B f709f8977d467d5a3170884bb75cd2f74a2f40801ae02a3725d442e18e4073f9c4a39cd1c9d2ce3949eb888be69d151f67d0cf2d0cbad7e2ec1ec6e78150b5c7 SHA512 7dd13150023f1cca8f5e01da7688ae418b5d0b36364efcfc15374a5147c7cabd46ff1d34e6499bc8e182dc0d34a366f5fe21d8ab4de4d112d269a97200401305
22 DIST pip-22.2.1.gh.tar.gz 9279141 BLAKE2B 61906027e36c8b3b82f3d17a59cbc995864622184c7f4099e9dfbb5082d1953dff72551558b8fe0d463d7defcd8b9403a978e4a8c7d79af5cd6b9dbbbcc9c7b5 SHA512 77996ce7e1aa4b5aab0c55dfee5e9bfe9f5f09f33cb796ce78bba7365f37ce9f1cce4eeaf5fdbeddde0819ecc6a30ffdafa6b7e25f93c672fcc8646303a7946e
23 +DIST pip-22.2.2.gh.tar.gz 9279218 BLAKE2B 2179b0d3f5f05bbd678f1785b4dbc0613078c09c83b45faa62d766182dfeb564095abda809ed99f45644abcb06c125efc528aeaed3ad40ab1c9e8972e33ccbb2 SHA512 bd59e28b55475b77a8f11ea771cbad3b2602ff974e219f9a55288963a9522c9279a5b00fde40fb65cfebefae0e905d3da3c06fe50b402aa5326b25f70a98a015
24 DIST pip-22.2.gh.tar.gz 9278410 BLAKE2B e32fe63e81593a0ec9c0110af0f07f1a47ddd3d6c660c11e9eb9142c251b7f45e3a1cc343193b123364a6a3a69490add7d4ebb368aac027c448f00f7cd163d7c SHA512 2ff3f9c2dc84c65c14c978e8c58cd3cee6cfff9753655c726763d6d7780d147479f32c47873d402ad9e0821fef940b971a7df93fabd6b998f07dea5af1251c9b
25 DIST setuptools-62.3.2-py3-none-any.whl 1225929 BLAKE2B 608952e201f749ebf557e3962ba9856d5bdcbc534f3a25598cab0d6c53282cfb3b9f007ba135497a8addf49db4c02bc4387c486d95a4529d01ce4114154ec28a SHA512 366d69dc44e326dd7549cdacd8dec481a14dce4feef4338adc38b9de5c4c338f04d61696e13ce8603be1315f2e8734100f92d3fe4b4b11843e19f550c9631978
26 DIST virtualenv-16.7.12.gh.tar.gz 8906590 BLAKE2B a1f206769e4e5797562906162e492e44c4a72720e4f88a0362dc802ce2df20c65aaab6a72dce2238445601a10fae59bd90cd362217994d30911f105afd71c5fa SHA512 0278b33fb19f6553e70ad3dcffa6ea1a455ff435b216ac9b4fadff216b2932714faa2bb6027af3058010111d8511a5c2fcd424f31c9645be361603971f111c8e
27
28 diff --git a/dev-python/pip/pip-22.2.2.ebuild b/dev-python/pip/pip-22.2.2.ebuild
29 new file mode 100644
30 index 000000000000..8d3b6ef3e28e
31 --- /dev/null
32 +++ b/dev-python/pip/pip-22.2.2.ebuild
33 @@ -0,0 +1,136 @@
34 +# Copyright 1999-2022 Gentoo Authors
35 +# Distributed under the terms of the GNU General Public License v2
36 +
37 +EAPI=8
38 +
39 +# please bump dev-python/ensurepip-wheels along with this package!
40 +
41 +DISTUTILS_USE_PEP517=setuptools
42 +PYTHON_TESTED=( python3_{8..10} )
43 +PYTHON_COMPAT=( "${PYTHON_TESTED[@]}" python3_11 pypy3 )
44 +PYTHON_REQ_USE="ssl(+),threads(+)"
45 +
46 +inherit bash-completion-r1 distutils-r1 multiprocessing
47 +
48 +# setuptools & wheel .whl files are required for testing,
49 +# the exact version is not very important.
50 +SETUPTOOLS_WHL="setuptools-62.3.2-py3-none-any.whl"
51 +WHEEL_WHL="wheel-0.36.2-py2.py3-none-any.whl"
52 +# upstream still requires virtualenv-16 for testing, we are now fetching
53 +# it directly to avoid blockers with virtualenv-20
54 +VENV_PV=16.7.12
55 +
56 +DESCRIPTION="The PyPA recommended tool for installing Python packages"
57 +HOMEPAGE="
58 + https://pip.pypa.io/en/stable/
59 + https://pypi.org/project/pip/
60 + https://github.com/pypa/pip/
61 +"
62 +SRC_URI="
63 + https://github.com/pypa/${PN}/archive/${PV}.tar.gz -> ${P}.gh.tar.gz
64 + test? (
65 + https://files.pythonhosted.org/packages/py3/s/setuptools/${SETUPTOOLS_WHL}
66 + https://files.pythonhosted.org/packages/py2.py3/w/wheel/${WHEEL_WHL}
67 + https://github.com/pypa/virtualenv/archive/${VENV_PV}.tar.gz
68 + -> virtualenv-${VENV_PV}.gh.tar.gz
69 + )
70 +"
71 +
72 +LICENSE="MIT"
73 +# bundled deps
74 +LICENSE+=" Apache-2.0 BSD BSD-2 ISC LGPL-2.1+ MPL-2.0 PSF-2"
75 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
76 +SLOT="0"
77 +IUSE="vanilla"
78 +
79 +RDEPEND="
80 + >=dev-python/setuptools-39.2.0[${PYTHON_USEDEP}]
81 +"
82 +BDEPEND="
83 + ${RDEPEND}
84 + test? (
85 + $(python_gen_cond_dep '
86 + dev-python/freezegun[${PYTHON_USEDEP}]
87 + dev-python/pretend[${PYTHON_USEDEP}]
88 + dev-python/pytest-xdist[${PYTHON_USEDEP}]
89 + dev-python/scripttest[${PYTHON_USEDEP}]
90 + dev-python/tomli-w[${PYTHON_USEDEP}]
91 + dev-python/werkzeug[${PYTHON_USEDEP}]
92 + dev-python/wheel[${PYTHON_USEDEP}]
93 + !alpha? ( !arm? ( !hppa? ( !ia64? ( !s390? ( !sparc? (
94 + dev-python/cryptography[${PYTHON_USEDEP}]
95 + ) ) ) ) ) )
96 + ' "${PYTHON_TESTED[@]}")
97 + )
98 +"
99 +
100 +distutils_enable_tests pytest
101 +
102 +python_prepare_all() {
103 + local PATCHES=(
104 + "${FILESDIR}/pip-22.2.1-no-coverage.patch"
105 + )
106 + if ! use vanilla; then
107 + PATCHES+=( "${FILESDIR}/pip-20.0.2-disable-system-install.patch" )
108 + fi
109 +
110 + distutils-r1_python_prepare_all
111 +
112 + if use test; then
113 + mkdir tests/data/common_wheels/ || die
114 + cp "${DISTDIR}"/{${SETUPTOOLS_WHL},${WHEEL_WHL}} \
115 + tests/data/common_wheels/ || die
116 + fi
117 +}
118 +
119 +python_compile_all() {
120 + # 'pip completion' command embeds full $0 into completion script, which confuses
121 + # 'complete' and causes QA warning when running as "${PYTHON} -m pip".
122 + # This trick sets correct $0 while still calling just installed pip.
123 + local pipcmd='import sys; sys.argv[0] = "pip"; __file__ = ""; from pip._internal.cli.main import main; sys.exit(main())'
124 + "${EPYTHON}" -c "${pipcmd}" completion --bash > completion.bash || die
125 + "${EPYTHON}" -c "${pipcmd}" completion --zsh > completion.zsh || die
126 +}
127 +
128 +python_test() {
129 + if ! has "${EPYTHON}" "${PYTHON_TESTED[@]/_/.}"; then
130 + einfo "Skipping tests on ${EPYTHON} since virtualenv-16 is broken"
131 + return 0
132 + fi
133 +
134 + local EPYTEST_DESELECT=(
135 + tests/functional/test_inspect.py::test_inspect_basic
136 + tests/functional/test_install.py::test_double_install_fail
137 + tests/functional/test_list.py::test_multiple_exclude_and_normalization
138 + # Internet
139 + tests/functional/test_install.py::test_install_dry_run
140 + tests/functional/test_install.py::test_install_editable_with_prefix_setup_cfg
141 + tests/functional/test_install.py::test_editable_install__local_dir_no_setup_py_with_pyproject
142 + tests/functional/test_install.py::test_editable_install__local_dir_setup_requires_with_pyproject
143 + )
144 +
145 + if ! has_version "dev-python/cryptography[${PYTHON_USEDEP}]"; then
146 + EPYTEST_DESELECT+=(
147 + tests/functional/test_install.py::test_install_sends_client_cert
148 + tests/functional/test_install_config.py::test_do_not_prompt_for_authentication
149 + tests/functional/test_install_config.py::test_prompt_for_authentication
150 + tests/functional/test_install_config.py::test_prompt_for_keyring_if_needed
151 + )
152 + fi
153 +
154 + local -x GENTOO_PIP_TESTING=1
155 + local -x PYTHONPATH="${WORKDIR}/virtualenv-${VENV_PV}"
156 + local -x SETUPTOOLS_USE_DISTUTILS=stdlib
157 + local -x PIP_DISABLE_PIP_VERSION_CHECK=1
158 + epytest -m "not network" -n "$(makeopts_jobs)"
159 +}
160 +
161 +python_install_all() {
162 + local DOCS=( AUTHORS.txt docs/html/**/*.rst )
163 + distutils-r1_python_install_all
164 +
165 + newbashcomp completion.bash pip
166 +
167 + insinto /usr/share/zsh/site-functions
168 + newins completion.zsh _pip
169 +}