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: Tue, 04 Aug 2020 13:48:49
Message-Id: 1596548918.2f593318612335150e33156be5b0f98662cb80fa.mgorny@gentoo
1 commit: 2f593318612335150e33156be5b0f98662cb80fa
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Tue Aug 4 12:27:27 2020 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Tue Aug 4 13:48:38 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2f593318
7
8 dev-python/pip: Bump to 20.2.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.2.1.ebuild | 145 +++++++++++++++++++++++++++++++++++++++
14 2 files changed, 146 insertions(+)
15
16 diff --git a/dev-python/pip/Manifest b/dev-python/pip/Manifest
17 index fb76bf56219..2b4569e4dd8 100644
18 --- a/dev-python/pip/Manifest
19 +++ b/dev-python/pip/Manifest
20 @@ -1,5 +1,6 @@
21 DIST pip-20.0.2.tar.gz 6445047 BLAKE2B 8f6e0a8908cf594c8d51818942b0839f59a495697a95dcc0347235e90cbe6d7f035f155761e7da9cfca1ba08b2c5a2c5def52c60c381f5428ef48efd1b6b5131 SHA512 f9965944ca0f319d01db1638ce97cf64772afff1778b3b1271155de73208cfcb3954d89a469c1143c0bf3288a53d4446165a49df994374b16ac6f7ffdae85857
22 DIST pip-20.1.1.tar.gz 6503229 BLAKE2B 5b0409042c970ec47fa6f947b21a53aca43563a6bb442fd5f91788fa97caf7167a84b4f581de87453eb0e55657d2ccd11dca2d1815c3bfe9ef5923994306a6db SHA512 ee7b0345c08fbe0215811d07b4c57c1ceece826871842f6d1c174d82e8eee0ad810aa5413d6763ecd5a513e151792a53c36623ab99d2049555ef2542d32d1658
23 +DIST pip-20.2.1.tar.gz 8717384 BLAKE2B a547b85296da67662080309fc8630c8ad3b0a6898319bd523719b411f0919cb15819e4b8e794aad9e7c13d6af2159c102ead0bd8d8f89e0e618017a8552cf985 SHA512 52abcc336a3c06b0e2b790a7fd4283483b46c1cc6be8e89d8640072ae4517d79afa074683622f8374ebf76a7c3516a05f261e35363327d5d68fb15ec6e6718cd
24 DIST pip-20.2.tar.gz 8715960 BLAKE2B dbcec865314ba0b65112e42477a2c48dc9a60592a07a834d3886025489fcd8de4c83733044d1ad84dd87af084677b2f406d5d8faa301853ab844b3770be168de SHA512 77db7c618b492cbdef54ef98d4e9a94735a809148fb08ef7d065fbeaf047ced26ddc20d0395a0b2db079c66175a267fc15717a24def70392182326b2c659e6f1
25 DIST setuptools-44.0.0-py2.py3-none-any.whl 583230 BLAKE2B 823e6792471660f247e30a938aa869d345a63db7294e5f9b4bd88f15a7694779011d29740fe317149620985f705fc6e18cbb07a18e5680cc11d7c229ffbc74f6 SHA512 7006fd303181afbeeec0e30cafb9fd1e4d3c6f55cfdd6343fedbc32b17dbb96b3d96ae37f4db27bfb168738727474cf425904ec280ff1d2b789fc48077a8fa84
26 DIST wheel-0.34.2-py2.py3-none-any.whl 26502 BLAKE2B 3a1bd4571c582245b60ff33c9bf74ff8a2ebafb26e56fc7b9bd215058d059b6bd13bbe21ce46002af257813a54126f27e19253f211e21c4548c7cf84cd15caf7 SHA512 4f1a44f4691ed8baad777d7874f7f4da96a5019eb485fd3a9eed9259aa2a9d5acccc6dc63a72128664347c64ee039a6076c6ca9c3b75a1f94457967864e522ed
27
28 diff --git a/dev-python/pip/pip-20.2.1.ebuild b/dev-python/pip/pip-20.2.1.ebuild
29 new file mode 100644
30 index 00000000000..8da2d952643
31 --- /dev/null
32 +++ b/dev-python/pip/pip-20.2.1.ebuild
33 @@ -0,0 +1,145 @@
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,9} 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="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~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-20[${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 + "${FILESDIR}/${PN}-20.2-no-coverage.patch"
93 + )
94 + if ! use vanilla; then
95 + PATCHES+=( "${FILESDIR}/pip-20.0.2-disable-system-install.patch" )
96 + fi
97 +
98 + # TODO
99 + rm tests/functional/test_new_resolver_user.py || die
100 +
101 + distutils-r1_python_prepare_all
102 +
103 + if use test; then
104 + mkdir tests/data/common_wheels/ || die
105 + cp "${DISTDIR}"/setuptools-${SETUPTOOLS_PV}-py2.py3-none-any.whl \
106 + tests/data/common_wheels/ || die
107 +
108 + cp "${DISTDIR}"/wheel-${WHEEL_PV}-py2.py3-none-any.whl \
109 + tests/data/common_wheels/ || die
110 + fi
111 +}
112 +
113 +python_test() {
114 + if [[ ${EPYTHON} == pypy* ]]; then
115 + ewarn "Skipping tests on ${EPYTHON} since they are very broken"
116 + return 0
117 + fi
118 +
119 + local -a exclude_tests
120 +
121 + # these will be built in to an expression passed to pytest to exclude
122 + exclude_tests=(
123 + git
124 + svn
125 + bazaar
126 + mercurial
127 + version_check
128 + uninstall_non_local_distutils
129 + pep518_uses_build_env
130 + install_package_with_root
131 + install_editable_with_prefix
132 + install_user_wheel
133 + install_from_current_directory_into_usersite
134 + uninstall_editable_from_usersite
135 + uninstall_from_usersite_with_dist_in_global_site
136 + build_env_isolation
137 + user_config_accepted
138 + )
139 +
140 + distutils_install_for_testing
141 +
142 + # generate the expression to exclude failing tests
143 + local exclude_expr
144 + printf -v exclude_expr "or %s " "${exclude_tests[@]}" || die
145 + exclude_expr="not (${exclude_expr#or })" || die
146 +
147 + local -x GENTOO_PIP_TESTING=1 \
148 + PATH="${TEST_DIR}/scripts:${PATH}" \
149 + PYTHONPATH="${TEST_DIR}/lib:${BUILD_DIR}/lib"
150 +
151 + pytest -vv \
152 + -k "${exclude_expr}" \
153 + -m "not network" \
154 + || die "Tests fail with ${EPYTHON}"
155 +}
156 +
157 +python_install_all() {
158 + # Prevent dbus auto-launch
159 + # https://bugs.gentoo.org/692178
160 + export DBUS_SESSION_BUS_ADDRESS="disabled:"
161 +
162 + local DOCS=( AUTHORS.txt docs/html/**/*.rst )
163 + distutils-r1_python_install_all
164 +
165 + COMPLETION="${T}"/completion.tmp
166 +
167 + # 'pip completion' command embeds full $0 into completion script, which confuses
168 + # 'complete' and causes QA warning when running as "${PYTHON} -m pip".
169 + # This trick sets correct $0 while still calling just installed pip.
170 + local pipcmd='import sys; sys.argv[0] = "pip"; import pip.__main__; sys.exit(pip.__main__._main())'
171 +
172 + ${PYTHON} -c "${pipcmd}" completion --bash > "${COMPLETION}" || die
173 + newbashcomp "${COMPLETION}" ${PN}
174 +
175 + ${PYTHON} -c "${pipcmd}" completion --zsh > "${COMPLETION}" || die
176 + insinto /usr/share/zsh/site-functions
177 + newins "${COMPLETION}" _pip
178 +}