summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2021-04-25 09:15:53 +0200
committerMichał Górny <mgorny@gentoo.org>2021-04-25 12:36:37 +0200
commit25ced6fcac89fb582d8e6a193f4d118b833417f0 (patch)
treed3a5ca32a42b9d37d388ec779d85e35efdcd2c79 /dev-python/pip
parentsys-apps/file: Stabilize 5.40-r2 arm64, #785292 (diff)
downloadgentoo-25ced6fcac89fb582d8e6a193f4d118b833417f0.tar.gz
gentoo-25ced6fcac89fb582d8e6a193f4d118b833417f0.tar.bz2
gentoo-25ced6fcac89fb582d8e6a193f4d118b833417f0.zip
dev-python/pip: Bump to 21.1
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/pip')
-rw-r--r--dev-python/pip/Manifest2
-rw-r--r--dev-python/pip/files/pip-21.1-no-coverage.patch51
-rw-r--r--dev-python/pip/pip-21.1.ebuild120
3 files changed, 173 insertions, 0 deletions
diff --git a/dev-python/pip/Manifest b/dev-python/pip/Manifest
index b77435b773aa..8cba56a7e4a8 100644
--- a/dev-python/pip/Manifest
+++ b/dev-python/pip/Manifest
@@ -1,3 +1,5 @@
DIST pip-21.0.1.tar.gz 8772082 BLAKE2B 2fdd78e2db8ceda2bd21fdeb4d29c0c2eda412827b87cc97ec1996a5b71b9c6e5938c0a6ef696163780bbbc55d81b8b3b1b6e2e79b05fbe9ce4bdd52e3ebdf13 SHA512 2db5397f4ca3a3f56f5add3f827bf1f0a4296019703438d68498266b9d2559b6baa3132061c5ad4c2a08bec6e76a2768763fdca02d86cf32aadd4640afbf3664
+DIST pip-21.1.tar.gz 8771224 BLAKE2B 2056a741b7f51d56c3984e2b0bcd1fa9cc12ba9677f80505fa5182fc0afad9c7dfe4ecf9429cf5ed5f8534f0a6a003b12455e90537a5dacbe188c8db548b71c3 SHA512 2617ae852cd52db980ab4131d711946b63930d30f480e050555bc61acb78577aa447b88065c6c8eba7e29c7167f78f04b11404cb0c1975caac464fa768ee7de8
DIST setuptools-51.3.3-py3-none-any.whl 786243 BLAKE2B cc8a98cdfd5cb78a342a3d50049c0ebd0965451e9bd4050b7a133346f505a17842a498531ade9bf932064a6cac81277ecf60d94ef94faa39b78740de87f9fd86 SHA512 1d4f29e392371b7f0e427d0570fddbdd1204f6c98e48a0a289db23b20f7c048551584ac946e30b90d720cce4f508b3c39208e9a70f87067d66734432963d141c
+DIST setuptools-56.0.0-py3-none-any.whl 784941 BLAKE2B 136352bcaeeb803f94983db2e0f9ec79dacc23a6742a2f6f1b4bdd2b29a104f4965d78f9b4adf1a501c7bf39d4ed85a6786b03489f90872661afbf5e674fd3f9 SHA512 32405236e9c2936cde137bc4d4d07b548391336ce0511cd5677dcd1f85c7a142b0947e03cdceaeb37067874f5aa71daacaa1a6af95ae9fe3ad8af264f61e10f4
DIST wheel-0.36.2-py2.py3-none-any.whl 35046 BLAKE2B bc4e8dab7c74eea34d3b4a813b7eaf6295a99a396a861b6cdd76f743043e89140bad132bdd13e385e8945ce02e0798e1d3ac73fc1b23bde5b2a83e4bb4dd5cdc SHA512 6bb5119b4d3704fe1e3c1eaaa3124edab13f61b46f8a0a8e75974fac4e5b25d8b53606071a03a8d8990ad1cfe2ab247ddea260098df2c0c35ae965be47080284
diff --git a/dev-python/pip/files/pip-21.1-no-coverage.patch b/dev-python/pip/files/pip-21.1-no-coverage.patch
new file mode 100644
index 000000000000..5f9c836d32ea
--- /dev/null
+++ b/dev-python/pip/files/pip-21.1-no-coverage.patch
@@ -0,0 +1,51 @@
+From 66ca1e64ce3fb971ec30d5f8b2a0bda49721bc2d Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Wed, 29 Jul 2020 07:42:25 +0200
+Subject: [PATCH] Disable coverage testing support inside test venvs
+
+---
+ tests/conftest.py | 14 +-------------
+ 1 file changed, 1 insertion(+), 13 deletions(-)
+
+diff --git a/tests/conftest.py b/tests/conftest.py
+index a53e0c4f7..c91d1e1ae 100644
+--- a/tests/conftest.py
++++ b/tests/conftest.py
+@@ -315,11 +315,6 @@ def wheel_install(tmpdir_factory, common_wheels):
+ return _common_wheel_editable_install(tmpdir_factory, common_wheels, "wheel")
+
+
+-@pytest.fixture(scope="session")
+-def coverage_install(tmpdir_factory, common_wheels):
+- return _common_wheel_editable_install(tmpdir_factory, common_wheels, "coverage")
+-
+-
+ def install_egg_link(venv, project_name, egg_info_dir):
+ with open(venv.site / "easy-install.pth", "a") as fp:
+ fp.write(str(egg_info_dir.resolve()) + "\n")
+@@ -329,7 +324,7 @@ def install_egg_link(venv, project_name, egg_info_dir):
+
+ @pytest.fixture(scope="session")
+ def virtualenv_template(
+- request, tmpdir_factory, pip_src, setuptools_install, coverage_install
++ request, tmpdir_factory, pip_src, setuptools_install
+ ):
+
+ if request.config.getoption("--use-venv"):
+@@ -355,13 +350,6 @@ def virtualenv_template(
+ [venv.bin / "python", "setup.py", "-q", "develop"], cwd=pip_editable
+ )
+
+- # Install coverage and pth file for executing it in any spawned processes
+- # in this virtual environment.
+- install_egg_link(venv, "coverage", coverage_install)
+- # zz prefix ensures the file is after easy-install.pth.
+- with open(venv.site / "zz-coverage-helper.pth", "a") as f:
+- f.write("import coverage; coverage.process_startup()")
+-
+ # Drop (non-relocatable) launchers.
+ for exe in os.listdir(venv.bin):
+ if not (
+--
+2.31.1
+
diff --git a/dev-python/pip/pip-21.1.ebuild b/dev-python/pip/pip-21.1.ebuild
new file mode 100644
index 000000000000..f6ec7e817918
--- /dev/null
+++ b/dev-python/pip/pip-21.1.ebuild
@@ -0,0 +1,120 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+DISTUTILS_USE_SETUPTOOLS=rdepend
+PYTHON_COMPAT=( python3_{7..9} pypy3 )
+PYTHON_REQ_USE="ssl(+),threads(+)"
+
+inherit bash-completion-r1 distutils-r1
+
+# setuptools & wheel .whl files are required for testing,
+# the exact version is not very important.
+SETUPTOOLS_WHL="setuptools-56.0.0-py3-none-any.whl"
+WHEEL_WHL="wheel-0.36.2-py2.py3-none-any.whl"
+
+DESCRIPTION="Installs python packages -- replacement for easy_install"
+HOMEPAGE="
+ https://pip.pypa.io/en/stable/
+ https://pypi.org/project/pip/
+ https://github.com/pypa/pip/"
+SRC_URI="
+ https://github.com/pypa/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz
+ test? (
+ https://files.pythonhosted.org/packages/py3/s/setuptools/${SETUPTOOLS_WHL}
+ https://files.pythonhosted.org/packages/py2.py3/w/wheel/${WHEEL_WHL}
+ )
+"
+
+LICENSE="MIT"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~sparc ~x86 ~x64-macos"
+SLOT="0"
+IUSE="test -vanilla"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ >=dev-python/setuptools-39.2.0[${PYTHON_USEDEP}]
+"
+BDEPEND="
+ ${RDEPEND}
+ test? (
+ dev-python/cryptography[${PYTHON_USEDEP}]
+ dev-python/csv23[${PYTHON_USEDEP}]
+ dev-python/freezegun[${PYTHON_USEDEP}]
+ dev-python/mock[${PYTHON_USEDEP}]
+ dev-python/pretend[${PYTHON_USEDEP}]
+ dev-python/pytest[${PYTHON_USEDEP}]
+ dev-python/pyyaml[${PYTHON_USEDEP}]
+ dev-python/scripttest[${PYTHON_USEDEP}]
+ <dev-python/virtualenv-20[${PYTHON_USEDEP}]
+ dev-python/werkzeug[${PYTHON_USEDEP}]
+ dev-python/wheel[${PYTHON_USEDEP}]
+ )
+"
+
+python_prepare_all() {
+ local PATCHES=(
+ "${FILESDIR}/${PN}-21.1-no-coverage.patch"
+ )
+ if ! use vanilla; then
+ PATCHES+=( "${FILESDIR}/pip-20.0.2-disable-system-install.patch" )
+ fi
+
+ distutils-r1_python_prepare_all
+
+ if use test; then
+ mkdir tests/data/common_wheels/ || die
+ cp "${DISTDIR}"/{${SETUPTOOLS_WHL},${WHEEL_WHL}} \
+ tests/data/common_wheels/ || die
+ fi
+}
+
+python_test() {
+ if [[ ${EPYTHON} == pypy* ]]; then
+ ewarn "Skipping tests on ${EPYTHON} since they are very broken"
+ return 0
+ fi
+
+ local deselect=(
+ tests/functional/test_install.py::test_double_install_fail
+ tests/functional/test_list.py::test_multiple_exclude_and_normalization
+ 'tests/unit/test_commands.py::test_index_group_handle_pip_version_check[False-False-True-download]'
+ 'tests/unit/test_commands.py::test_index_group_handle_pip_version_check[False-False-True-install]'
+ 'tests/unit/test_commands.py::test_index_group_handle_pip_version_check[False-False-True-list]'
+ 'tests/unit/test_commands.py::test_index_group_handle_pip_version_check[False-False-True-wheel]'
+ tests/functional/test_install.py::test_install_pip_does_not_modify_pip_when_satisfied
+ # Internet
+ tests/functional/test_install.py::test_install_editable_with_prefix_setup_cfg
+ )
+
+ distutils_install_for_testing --via-root
+
+ local -x GENTOO_PIP_TESTING=1 \
+ PATH="${TEST_DIR}/scripts:${PATH}" \
+ PYTHONPATH="${TEST_DIR}/lib:${BUILD_DIR}/lib"
+ epytest ${deselect[@]/#/--deselect } -m "not network"
+}
+
+python_install_all() {
+ # Prevent dbus auto-launch
+ # https://bugs.gentoo.org/692178
+ export DBUS_SESSION_BUS_ADDRESS="disabled:"
+
+ local DOCS=( AUTHORS.txt docs/html/**/*.rst )
+ distutils-r1_python_install_all
+
+ COMPLETION="${T}"/completion.tmp
+
+ # 'pip completion' command embeds full $0 into completion script, which confuses
+ # 'complete' and causes QA warning when running as "${PYTHON} -m pip".
+ # This trick sets correct $0 while still calling just installed pip.
+ local pipcmd='import sys; sys.argv[0] = "pip"; from pip._internal.cli.main import main; sys.exit(main())'
+
+ ${PYTHON} -c "${pipcmd}" completion --bash > "${COMPLETION}" || die
+ newbashcomp "${COMPLETION}" ${PN}
+
+ ${PYTHON} -c "${pipcmd}" completion --zsh > "${COMPLETION}" || die
+ insinto /usr/share/zsh/site-functions
+ newins "${COMPLETION}" _pip
+}