summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/pip')
-rw-r--r--dev-python/pip/Manifest7
-rw-r--r--dev-python/pip/files/pip-19.3-disable-version-check.patch24
-rw-r--r--dev-python/pip/files/pip-20.0.2-disable-system-install.patch29
-rw-r--r--dev-python/pip/files/pip-20.1.1-test-endian.patch78
-rw-r--r--dev-python/pip/files/pip-20.2-no-coverage.patch163
-rw-r--r--dev-python/pip/files/pip-23.1-no-coverage.patch52
-rw-r--r--dev-python/pip/files/pip-23.3.1-no-color.patch35
-rw-r--r--dev-python/pip/metadata.xml2
-rw-r--r--dev-python/pip/pip-20.0.2.ebuild138
-rw-r--r--dev-python/pip/pip-20.1.1.ebuild141
-rw-r--r--dev-python/pip/pip-20.2.1.ebuild145
-rw-r--r--dev-python/pip/pip-20.2.ebuild145
-rw-r--r--dev-python/pip/pip-24.0.ebuild145
13 files changed, 234 insertions, 870 deletions
diff --git a/dev-python/pip/Manifest b/dev-python/pip/Manifest
index 2b4569e4dd8b..3116dbf3047d 100644
--- a/dev-python/pip/Manifest
+++ b/dev-python/pip/Manifest
@@ -1,6 +1 @@
-DIST pip-20.0.2.tar.gz 6445047 BLAKE2B 8f6e0a8908cf594c8d51818942b0839f59a495697a95dcc0347235e90cbe6d7f035f155761e7da9cfca1ba08b2c5a2c5def52c60c381f5428ef48efd1b6b5131 SHA512 f9965944ca0f319d01db1638ce97cf64772afff1778b3b1271155de73208cfcb3954d89a469c1143c0bf3288a53d4446165a49df994374b16ac6f7ffdae85857
-DIST pip-20.1.1.tar.gz 6503229 BLAKE2B 5b0409042c970ec47fa6f947b21a53aca43563a6bb442fd5f91788fa97caf7167a84b4f581de87453eb0e55657d2ccd11dca2d1815c3bfe9ef5923994306a6db SHA512 ee7b0345c08fbe0215811d07b4c57c1ceece826871842f6d1c174d82e8eee0ad810aa5413d6763ecd5a513e151792a53c36623ab99d2049555ef2542d32d1658
-DIST pip-20.2.1.tar.gz 8717384 BLAKE2B a547b85296da67662080309fc8630c8ad3b0a6898319bd523719b411f0919cb15819e4b8e794aad9e7c13d6af2159c102ead0bd8d8f89e0e618017a8552cf985 SHA512 52abcc336a3c06b0e2b790a7fd4283483b46c1cc6be8e89d8640072ae4517d79afa074683622f8374ebf76a7c3516a05f261e35363327d5d68fb15ec6e6718cd
-DIST pip-20.2.tar.gz 8715960 BLAKE2B dbcec865314ba0b65112e42477a2c48dc9a60592a07a834d3886025489fcd8de4c83733044d1ad84dd87af084677b2f406d5d8faa301853ab844b3770be168de SHA512 77db7c618b492cbdef54ef98d4e9a94735a809148fb08ef7d065fbeaf047ced26ddc20d0395a0b2db079c66175a267fc15717a24def70392182326b2c659e6f1
-DIST setuptools-44.0.0-py2.py3-none-any.whl 583230 BLAKE2B 823e6792471660f247e30a938aa869d345a63db7294e5f9b4bd88f15a7694779011d29740fe317149620985f705fc6e18cbb07a18e5680cc11d7c229ffbc74f6 SHA512 7006fd303181afbeeec0e30cafb9fd1e4d3c6f55cfdd6343fedbc32b17dbb96b3d96ae37f4db27bfb168738727474cf425904ec280ff1d2b789fc48077a8fa84
-DIST wheel-0.34.2-py2.py3-none-any.whl 26502 BLAKE2B 3a1bd4571c582245b60ff33c9bf74ff8a2ebafb26e56fc7b9bd215058d059b6bd13bbe21ce46002af257813a54126f27e19253f211e21c4548c7cf84cd15caf7 SHA512 4f1a44f4691ed8baad777d7874f7f4da96a5019eb485fd3a9eed9259aa2a9d5acccc6dc63a72128664347c64ee039a6076c6ca9c3b75a1f94457967864e522ed
+DIST pip-24.0.gh.tar.gz 9398156 BLAKE2B 17a7ed9e15e9b8efa0d3e3c5586dc446958b62cf9ba52155a0d1ad97a3e212ee7a08a0e88a592718fc3d542eb8f434155a75cb98d90c008904bd8f59bd2b40b6 SHA512 0c2ecb2ecde4f155c83468d35bc4f52f37efffc16821ae7c706d035e1e8cc3709b41cb10f8140ff09205e8bbdba2c76128ad76d1cbd18401328b619228e834df
diff --git a/dev-python/pip/files/pip-19.3-disable-version-check.patch b/dev-python/pip/files/pip-19.3-disable-version-check.patch
deleted file mode 100644
index e8fe868431d1..000000000000
--- a/dev-python/pip/files/pip-19.3-disable-version-check.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-diff --git a/src/pip/_internal/cli/req_command.py b/src/pip/_internal/cli/req_command.py
-index 203e86a4..a2183f10 100644
---- a/src/pip/_internal/cli/req_command.py
-+++ b/src/pip/_internal/cli/req_command.py
-@@ -129,17 +129,8 @@ class IndexGroupCommand(Command, SessionCommandMixin):
- # Make sure the index_group options are present.
- assert hasattr(options, 'no_index')
-
-- if options.disable_pip_version_check or options.no_index:
-- return
--
-- # Otherwise, check if we're using the latest version of pip available.
-- session = self._build_session(
-- options,
-- retries=0,
-- timeout=min(5, options.timeout)
-- )
-- with session:
-- pip_self_version_check(session, options)
-+ # Disabled on Gentoo
-+ return
-
-
- class RequirementCommand(IndexGroupCommand):
diff --git a/dev-python/pip/files/pip-20.0.2-disable-system-install.patch b/dev-python/pip/files/pip-20.0.2-disable-system-install.patch
deleted file mode 100644
index e0b0034e407a..000000000000
--- a/dev-python/pip/files/pip-20.0.2-disable-system-install.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 3aee04cbb93c0e479b040e682b2aef676629c9a2 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
-Date: Sat, 1 Feb 2020 09:14:46 +0100
-Subject: [PATCH] install: Raise an error to avoid breaking python-exec
-
-Running pip without --target, --prefix, --root, or --user will result
-in packages being installed systemwide. This has a tendency to break
-python-exec if setuptools gets installed or upgraded.
----
- src/pip/_internal/commands/install.py | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/src/pip/_internal/commands/install.py b/src/pip/_internal/commands/install.py
-index 8c2c32fd..41bac878 100644
---- a/src/pip/_internal/commands/install.py
-+++ b/src/pip/_internal/commands/install.py
-@@ -238,6 +238,9 @@ class InstallCommand(RequirementCommand):
- if options.upgrade:
- upgrade_strategy = options.upgrade_strategy
-
-+ if not options.use_user_site and not options.target_dir and not options.root_path and not options.prefix_path and not os.getenv('GENTOO_PIP_TESTING'):
-+ raise CommandError("(Gentoo) Please run pip with the --user option to avoid breaking python-exec")
-+
- cmdoptions.check_dist_restriction(options, check_target=True)
-
- install_options = options.install_options or []
---
-2.28.0
-
diff --git a/dev-python/pip/files/pip-20.1.1-test-endian.patch b/dev-python/pip/files/pip-20.1.1-test-endian.patch
deleted file mode 100644
index b6aea145656f..000000000000
--- a/dev-python/pip/files/pip-20.1.1-test-endian.patch
+++ /dev/null
@@ -1,78 +0,0 @@
-From b30dd1e04e1f37901733f1be0a5a1e02c466ad0c Mon Sep 17 00:00:00 2001
-From: gutsytechster <prashantsharma161198@gmail.com>
-Date: Wed, 15 Apr 2020 19:54:48 +0530
-Subject: [PATCH] fix(tests/unit): Update tests to be endian safe
-
-This updates `test_path_to_display` and `test_str_to_display__encoding`
-to use the endian safe expected result instead of the hardcoded one.
-
-This fixes https://github.com/pypa/pip/issues/7921
----
- tests/unit/test_compat.py | 8 +++++++-
- tests/unit/test_utils.py | 16 +++++++++++++---
- 2 files changed, 20 insertions(+), 4 deletions(-)
-
-diff --git a/tests/unit/test_compat.py b/tests/unit/test_compat.py
-index 1f31bc5c..b13087a1 100644
---- a/tests/unit/test_compat.py
-+++ b/tests/unit/test_compat.py
-@@ -2,6 +2,7 @@
-
- import locale
- import os
-+import sys
-
- import pytest
-
-@@ -91,8 +92,13 @@ def test_str_to_display__decode_error(monkeypatch, caplog):
- # Encode with an incompatible encoding.
- data = u'ab'.encode('utf-16')
- actual = str_to_display(data)
-+ # Keep the expected value endian safe
-+ if sys.byteorder == "little":
-+ expected = "\\xff\\xfea\x00b\x00"
-+ elif sys.byteorder == "big":
-+ expected = "\\xfe\\xff\x00a\x00b"
-
-- assert actual == u'\\xff\\xfea\x00b\x00', (
-+ assert actual == expected, (
- # Show the encoding for easier troubleshooting.
- 'encoding: {!r}'.format(locale.getpreferredencoding())
- )
-diff --git a/tests/unit/test_utils.py b/tests/unit/test_utils.py
-index 7d74a664..ebabd29e 100644
---- a/tests/unit/test_utils.py
-+++ b/tests/unit/test_utils.py
-@@ -375,6 +375,18 @@ def test_rmtree_retries_for_3sec(tmpdir, monkeypatch):
- rmtree('foo')
-
-
-+if sys.byteorder == "little":
-+ expected_byte_string = (
-+ u"b'\\xff\\xfe/\\x00p\\x00a\\x00t\\x00h\\x00/"
-+ "\\x00d\\x00\\xe9\\x00f\\x00'"
-+ )
-+elif sys.byteorder == "big":
-+ expected_byte_string = (
-+ u"b'\\xfe\\xff\\x00/\\x00p\\x00a\\x00t\\x00h\\"
-+ "x00/\\x00d\\x00\\xe9\\x00f'"
-+ )
-+
-+
- @pytest.mark.parametrize('path, fs_encoding, expected', [
- (None, None, None),
- # Test passing a text (unicode) string.
-@@ -383,9 +395,7 @@ def test_rmtree_retries_for_3sec(tmpdir, monkeypatch):
- (u'/path/déf'.encode('utf-8'), 'utf-8', u'/path/déf'),
- # Test a bytes object with a character that can't be decoded.
- (u'/path/déf'.encode('utf-8'), 'ascii', u"b'/path/d\\xc3\\xa9f'"),
-- (u'/path/déf'.encode('utf-16'), 'utf-8',
-- u"b'\\xff\\xfe/\\x00p\\x00a\\x00t\\x00h\\x00/"
-- "\\x00d\\x00\\xe9\\x00f\\x00'"),
-+ (u'/path/déf'.encode('utf-16'), 'utf-8', expected_byte_string),
- ])
- def test_path_to_display(monkeypatch, path, fs_encoding, expected):
- monkeypatch.setattr(sys, 'getfilesystemencoding', lambda: fs_encoding)
---
-2.26.2
-
diff --git a/dev-python/pip/files/pip-20.2-no-coverage.patch b/dev-python/pip/files/pip-20.2-no-coverage.patch
deleted file mode 100644
index 55be5b8c9712..000000000000
--- a/dev-python/pip/files/pip-20.2-no-coverage.patch
+++ /dev/null
@@ -1,163 +0,0 @@
-From 43389903a55a5432ca8556f42fb2252c91c7ca45 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] Revert "Add basic test coverage configuration"
-
-This is just PITA since coverage uses native C extensions.
----
- .coveragerc | 4 +++
- setup.cfg | 38 ----------------------
- tests/conftest.py | 16 +--------
- tools/requirements/tests-common_wheels.txt | 2 --
- tox.ini | 16 ++-------
- 5 files changed, 7 insertions(+), 69 deletions(-)
- create mode 100644 .coveragerc
-
-diff --git a/.coveragerc b/.coveragerc
-new file mode 100644
-index 00000000..5f833c94
---- /dev/null
-+++ b/.coveragerc
-@@ -0,0 +1,4 @@
-+[run]
-+branch = True
-+omit =
-+ src/pip/_vendor/*
-diff --git a/setup.cfg b/setup.cfg
-index 45fd58a3..e40596e9 100644
---- a/setup.cfg
-+++ b/setup.cfg
-@@ -67,44 +67,6 @@ markers =
- yaml: yaml based tests
- fails_on_new_resolver: Does not yet work on the new resolver
-
--[coverage:run]
--branch = True
--# Do not gather coverage for vendored libraries.
--omit = */_vendor/*
--# Centralized absolute file prefix for coverage files.
--data_file = ${COVERAGE_OUTPUT_DIR}/.coverage
--# By default, each covered process will try to truncate and then write to
--# `data_file`, but with `parallel`, they will write to separate files suffixed
--# with hostname, pid, and a timestamp.
--parallel = True
--# If not set, then at the termination of each worker (when using pytest-xdist),
--# the following is traced: "Coverage.py warning: Module pip was previously
--# imported, but not measured (module-not-measured)"
--disable_warnings = module-not-measured
--
--[coverage:paths]
--# We intentionally use "source0" here because pytest-cov unconditionally sets
--# "source" after loading the config.
--source0 =
-- # The primary source code path which other paths will be combined into.
-- src/pip/
-- # Unit test source directory e.g.
-- # `.tox/coverage-py3/lib/pythonX.Y/site-packages/pip/...`
-- */site-packages/pip/
-- # Functional test virtual environment directories, which look like
-- # `tmpdir/pip0/pip/src/pip/...`
-- */pip/src/pip/
--
--[coverage:report]
--exclude_lines =
-- # We must re-state the default because the `exclude_lines` option overrides
-- # it.
-- pragma: no cover
-- # This excludes typing-specific code, which will be validated by mypy anyway.
-- if MYPY_CHECK_RUNNING
-- # Can be set to exclude e.g. `if PY2:` on Python 3
-- ${PIP_CI_COVERAGE_EXCLUDES}
--
- [bdist_wheel]
- universal = 1
-
-diff --git a/tests/conftest.py b/tests/conftest.py
-index 2aab5020..0db6d967 100644
---- a/tests/conftest.py
-+++ b/tests/conftest.py
-@@ -294,13 +294,6 @@ def wheel_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')
-@@ -310,7 +303,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):
-+ setuptools_install, common_wheels):
-
- if six.PY3 and request.config.getoption('--use-venv'):
- venv_type = 'venv'
-@@ -334,13 +327,6 @@ def virtualenv_template(request, tmpdir_factory, pip_src,
- subprocess.check_call([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 (
-diff --git a/tools/requirements/tests-common_wheels.txt b/tools/requirements/tests-common_wheels.txt
-index f0edf0b0..6703d606 100644
---- a/tools/requirements/tests-common_wheels.txt
-+++ b/tools/requirements/tests-common_wheels.txt
-@@ -7,5 +7,3 @@
-
- setuptools >= 40.8.0
- wheel
--# As required by pytest-cov.
--coverage >= 4.4
-diff --git a/tox.ini b/tox.ini
-index 82e9abc6..7a19ca61 100644
---- a/tox.ini
-+++ b/tox.ini
-@@ -8,7 +8,6 @@ envlist =
- # Wrapper for calls to pip that make sure the version being used is the
- # original virtualenv (stable) version, and not the code being tested.
- pip = python {toxinidir}/tools/tox_pip.py
--mkdirp = python -c 'import os, sys; os.path.exists(sys.argv[1]) or os.mkdir(sys.argv[1])'
-
- [testenv]
- # Remove USERNAME once we drop PY2.
-@@ -31,20 +30,9 @@ commands = pytest --timeout 300 []
- install_command = {[helpers]pip} install {opts} {packages}
- list_dependencies_command = {[helpers]pip} freeze --all
-
--[testenv:coverage]
-+[testenv:coverage-py3]
- basepython = python3
--commands =
-- {[helpers]mkdirp} {toxinidir}/.coverage-output
-- pytest --timeout 300 --cov=pip --cov-config={toxinidir}/setup.cfg []
--
--setenv =
-- # Used in coverage configuration in setup.cfg.
-- COVERAGE_OUTPUT_DIR = {toxinidir}/.coverage-output
-- # Ensure coverage is enabled in child processes in virtual environments
-- # since they won't already have been enabled by pytest-cov.
-- COVERAGE_PROCESS_START = {toxinidir}/setup.cfg
-- # Used in coverage configuration in setup.cfg.
-- PIP_CI_COVERAGE_EXCLUDES = if PY2
-+commands = pytest --timeout 300 --cov=pip --cov-report=term-missing --cov-report=xml --cov-report=html tests/unit {posargs}
-
- [testenv:docs]
- # Don't skip install here since pip_sphinxext uses pip's internals.
---
-2.28.0
-
diff --git a/dev-python/pip/files/pip-23.1-no-coverage.patch b/dev-python/pip/files/pip-23.1-no-coverage.patch
new file mode 100644
index 000000000000..943cc281cdfb
--- /dev/null
+++ b/dev-python/pip/files/pip-23.1-no-coverage.patch
@@ -0,0 +1,52 @@
+From d915b0eec7b5844c06b5d8853544c8c5b538b0b9 Mon Sep 17 00:00:00 2001
+From: Arthur Zamarin <arthurzam@gentoo.org>
+Date: Fri, 29 Jul 2022 14:06:03 +0300
+Subject: [PATCH] Disable coverage testing support inside test venvs
+
+---
+ tests/conftest.py | 15 ---------------
+ 1 file changed, 15 deletions(-)
+
+diff --git a/tests/conftest.py b/tests/conftest.py
+index 57dd7e68a..af2af9ffa 100644
+--- a/tests/conftest.py
++++ b/tests/conftest.py
+@@ -408,13 +408,6 @@ def wheel_install(tmpdir_factory: pytest.TempPathFactory, common_wheels: Path) -
+ return _common_wheel_editable_install(tmpdir_factory, common_wheels, "wheel")
+
+
+-@pytest.fixture(scope="session")
+-def coverage_install(
+- tmpdir_factory: pytest.TempPathFactory, common_wheels: Path
+-) -> Path:
+- return _common_wheel_editable_install(tmpdir_factory, common_wheels, "coverage")
+-
+-
+ def install_pth_link(
+ venv: VirtualEnvironment, project_name: str, lib_dir: Path
+ ) -> None:
+@@ -430,7 +423,6 @@ def virtualenv_template(
+ pip_src: Path,
+ setuptools_install: Path,
+ wheel_install: Path,
+- coverage_install: Path,
+ ) -> Iterator[VirtualEnvironment]:
+ venv_type: VirtualEnvironmentType
+ if request.config.getoption("--use-venv"):
+@@ -457,13 +449,6 @@ def virtualenv_template(
+ [os.fspath(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_pth_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.40.0
+
diff --git a/dev-python/pip/files/pip-23.3.1-no-color.patch b/dev-python/pip/files/pip-23.3.1-no-color.patch
new file mode 100644
index 000000000000..528e2c6cf465
--- /dev/null
+++ b/dev-python/pip/files/pip-23.3.1-no-color.patch
@@ -0,0 +1,35 @@
+From ad01e9c2a965d395c5902c8ad70c970c7631316b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Sat, 25 Nov 2023 07:36:59 +0100
+Subject: [PATCH] Fix tests when NO_COLOR is set in the calling environment
+
+Add `FORCE_COLOR` and `NO_COLOR` variables to the `isolate()` fixture
+to ensure that these two variables do not affect internal test output.
+This fixes the following two test failures when pytest is called with
+`NO_COLOR` set:
+
+```
+FAILED tests/unit/test_exceptions.py::TestDiagnosticPipErrorPresentation_ASCII::test_complete_color - AssertionError: assert '\x1b[1merror...ing harder.\n' == '\x1b[1;31mer...ing harder.\n'
+FAILED tests/unit/test_exceptions.py::TestDiagnosticPipErrorPresentation_Unicode::test_complete_color - AssertionError: assert '\x1b[1merror...ing harder.\n' == '\x1b[1;31mer...ing harder.\n'
+```
+---
+ news/7ae28a10-04c4-4a1f-a276-4c9e04f2e0c1.trivial.rst | 0
+ tests/conftest.py | 4 ++++
+ 2 files changed, 4 insertions(+)
+ create mode 100644 news/7ae28a10-04c4-4a1f-a276-4c9e04f2e0c1.trivial.rst
+
+diff --git a/tests/conftest.py b/tests/conftest.py
+index c5bf4bb9567..8d9eb029c79 100644
+--- a/tests/conftest.py
++++ b/tests/conftest.py
+@@ -318,6 +318,10 @@ def isolate(tmpdir: Path, monkeypatch: pytest.MonkeyPatch) -> None:
+ # Make sure tests don't share a requirements tracker.
+ monkeypatch.delenv("PIP_BUILD_TRACKER", False)
+
++ # Make sure color control variables don't affect internal output.
++ monkeypatch.delenv("FORCE_COLOR", False)
++ monkeypatch.delenv("NO_COLOR", False)
++
+ # FIXME: Windows...
+ os.makedirs(os.path.join(home_dir, ".config", "git"))
+ with open(os.path.join(home_dir, ".config", "git", "config"), "wb") as fp:
diff --git a/dev-python/pip/metadata.xml b/dev-python/pip/metadata.xml
index 93b87f39e3d6..632fe93333db 100644
--- a/dev-python/pip/metadata.xml
+++ b/dev-python/pip/metadata.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>python@gentoo.org</email>
diff --git a/dev-python/pip/pip-20.0.2.ebuild b/dev-python/pip/pip-20.0.2.ebuild
deleted file mode 100644
index 90db22a8b7b5..000000000000
--- a/dev-python/pip/pip-20.0.2.ebuild
+++ /dev/null
@@ -1,138 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-DISTUTILS_USE_SETUPTOOLS=rdepend
-PYTHON_COMPAT=( python2_7 python3_{6,7,8} pypy3 )
-PYTHON_REQ_USE="ssl(+),threads(+)"
-
-inherit bash-completion-r1 distutils-r1 multiprocessing
-
-SETUPTOOLS_PV="44.0.0"
-WHEEL_PV="0.34.2"
-
-DESCRIPTION="Installs python packages -- replacement for easy_install"
-HOMEPAGE="https://pip.pypa.io/ 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/py2.py3/s/setuptools/setuptools-${SETUPTOOLS_PV}-py2.py3-none-any.whl
- https://files.pythonhosted.org/packages/py2.py3/w/wheel/wheel-${WHEEL_PV}-py2.py3-none-any.whl
- )
-"
-# PyPI archive does not have tests, so we need to download from GitHub.
-# setuptools & wheel .whl files are required for testing, exact version is not very important.
-
-LICENSE="MIT"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ppc ppc64 sparc x86"
-SLOT="0"
-IUSE="test -vanilla"
-
-# disable-system-install patch breaks tests
-RESTRICT="!test? ( test )"
-
-RDEPEND="
- >=dev-python/setuptools-39.2.0[${PYTHON_USEDEP}]
-"
-DEPEND="
- ${RDEPEND}
- test? (
- dev-python/cryptography[${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[${PYTHON_USEDEP}]
- dev-python/werkzeug[${PYTHON_USEDEP}]
- dev-python/wheel[${PYTHON_USEDEP}]
- )
-"
-
-python_prepare_all() {
- local PATCHES=(
- "${FILESDIR}/${PN}-19.3-disable-version-check.patch"
- "${FILESDIR}/${PN}-20.1.1-test-endian.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-${SETUPTOOLS_PV}-py2.py3-none-any.whl \
- tests/data/common_wheels/ || die
-
- cp "${DISTDIR}"/wheel-${WHEEL_PV}-py2.py3-none-any.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 -a exclude_tests
-
- # these will be built in to an expression passed to pytest to exclude
- exclude_tests=(
- git
- svn
- bazaar
- mercurial
- version_check
- uninstall_non_local_distutils
- pep518_uses_build_env
- install_package_with_root
- install_editable_with_prefix
- install_user_wheel
- install_from_current_directory_into_usersite
- uninstall_editable_from_usersite
- uninstall_from_usersite_with_dist_in_global_site
- build_env_isolation
- )
-
- distutils_install_for_testing
-
- # generate the expression to exclude failing tests
- local exclude_expr
- printf -v exclude_expr "or %s " "${exclude_tests[@]}" || die
- exclude_expr="not (${exclude_expr#or })" || die
-
- local -x GENTOO_PIP_TESTING=1 \
- PATH="${TEST_DIR}/scripts:${PATH}" \
- PYTHONPATH="${TEST_DIR}/lib:${BUILD_DIR}/lib"
-
- pytest -vv \
- -k "${exclude_expr}" \
- -m "not network" \
- || die "Tests fail with ${EPYTHON}"
-}
-
-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"; import pip.__main__; sys.exit(pip.__main__._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
-}
diff --git a/dev-python/pip/pip-20.1.1.ebuild b/dev-python/pip/pip-20.1.1.ebuild
deleted file mode 100644
index 18e3533072f9..000000000000
--- a/dev-python/pip/pip-20.1.1.ebuild
+++ /dev/null
@@ -1,141 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-DISTUTILS_USE_SETUPTOOLS=rdepend
-PYTHON_COMPAT=( python2_7 python3_{6,7,8,9} pypy3 )
-PYTHON_REQ_USE="ssl(+),threads(+)"
-
-inherit bash-completion-r1 distutils-r1 multiprocessing
-
-SETUPTOOLS_PV="44.0.0"
-WHEEL_PV="0.34.2"
-
-DESCRIPTION="Installs python packages -- replacement for easy_install"
-HOMEPAGE="https://pip.pypa.io/ 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/py2.py3/s/setuptools/setuptools-${SETUPTOOLS_PV}-py2.py3-none-any.whl
- https://files.pythonhosted.org/packages/py2.py3/w/wheel/wheel-${WHEEL_PV}-py2.py3-none-any.whl
- )
-"
-# PyPI archive does not have tests, so we need to download from GitHub.
-# setuptools & wheel .whl files are required for testing, exact version is not very important.
-
-LICENSE="MIT"
-KEYWORDS="~alpha ~amd64 arm ~arm64 hppa ~ia64 ~ppc ~ppc64 ~sparc x86"
-SLOT="0"
-IUSE="test -vanilla"
-
-# disable-system-install patch breaks tests
-RESTRICT="!test? ( test )"
-
-RDEPEND="
- >=dev-python/setuptools-39.2.0[${PYTHON_USEDEP}]
-"
-DEPEND="
- ${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_gen_cond_dep 'dev-python/enum34[${PYTHON_USEDEP}]' -2)
- )
-"
-
-python_prepare_all() {
- local PATCHES=(
- "${FILESDIR}/${PN}-19.3-disable-version-check.patch"
- "${FILESDIR}/${P}-test-endian.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-${SETUPTOOLS_PV}-py2.py3-none-any.whl \
- tests/data/common_wheels/ || die
-
- cp "${DISTDIR}"/wheel-${WHEEL_PV}-py2.py3-none-any.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 -a exclude_tests
-
- # these will be built in to an expression passed to pytest to exclude
- exclude_tests=(
- git
- svn
- bazaar
- mercurial
- version_check
- uninstall_non_local_distutils
- pep518_uses_build_env
- install_package_with_root
- install_editable_with_prefix
- install_user_wheel
- install_from_current_directory_into_usersite
- uninstall_editable_from_usersite
- uninstall_from_usersite_with_dist_in_global_site
- build_env_isolation
- user_config_accepted
- )
-
- distutils_install_for_testing
-
- # generate the expression to exclude failing tests
- local exclude_expr
- printf -v exclude_expr "or %s " "${exclude_tests[@]}" || die
- exclude_expr="not (${exclude_expr#or })" || die
-
- local -x GENTOO_PIP_TESTING=1 \
- PATH="${TEST_DIR}/scripts:${PATH}" \
- PYTHONPATH="${TEST_DIR}/lib:${BUILD_DIR}/lib"
-
- pytest -vv \
- -k "${exclude_expr}" \
- -m "not network" \
- || die "Tests fail with ${EPYTHON}"
-}
-
-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"; import pip.__main__; sys.exit(pip.__main__._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
-}
diff --git a/dev-python/pip/pip-20.2.1.ebuild b/dev-python/pip/pip-20.2.1.ebuild
deleted file mode 100644
index 8da2d952643e..000000000000
--- a/dev-python/pip/pip-20.2.1.ebuild
+++ /dev/null
@@ -1,145 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-DISTUTILS_USE_SETUPTOOLS=rdepend
-PYTHON_COMPAT=( python2_7 python3_{6,7,8,9} pypy3 )
-PYTHON_REQ_USE="ssl(+),threads(+)"
-
-inherit bash-completion-r1 distutils-r1 multiprocessing
-
-SETUPTOOLS_PV="44.0.0"
-WHEEL_PV="0.34.2"
-
-DESCRIPTION="Installs python packages -- replacement for easy_install"
-HOMEPAGE="https://pip.pypa.io/ 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/py2.py3/s/setuptools/setuptools-${SETUPTOOLS_PV}-py2.py3-none-any.whl
- https://files.pythonhosted.org/packages/py2.py3/w/wheel/wheel-${WHEEL_PV}-py2.py3-none-any.whl
- )
-"
-# PyPI archive does not have tests, so we need to download from GitHub.
-# setuptools & wheel .whl files are required for testing, exact version is not very important.
-
-LICENSE="MIT"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
-SLOT="0"
-IUSE="test -vanilla"
-
-# disable-system-install patch breaks tests
-RESTRICT="!test? ( test )"
-
-RDEPEND="
- >=dev-python/setuptools-39.2.0[${PYTHON_USEDEP}]
-"
-DEPEND="
- ${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_gen_cond_dep 'dev-python/enum34[${PYTHON_USEDEP}]' -2)
- )
-"
-
-python_prepare_all() {
- local PATCHES=(
- "${FILESDIR}/${PN}-19.3-disable-version-check.patch"
- "${FILESDIR}/${PN}-20.2-no-coverage.patch"
- )
- if ! use vanilla; then
- PATCHES+=( "${FILESDIR}/pip-20.0.2-disable-system-install.patch" )
- fi
-
- # TODO
- rm tests/functional/test_new_resolver_user.py || die
-
- distutils-r1_python_prepare_all
-
- if use test; then
- mkdir tests/data/common_wheels/ || die
- cp "${DISTDIR}"/setuptools-${SETUPTOOLS_PV}-py2.py3-none-any.whl \
- tests/data/common_wheels/ || die
-
- cp "${DISTDIR}"/wheel-${WHEEL_PV}-py2.py3-none-any.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 -a exclude_tests
-
- # these will be built in to an expression passed to pytest to exclude
- exclude_tests=(
- git
- svn
- bazaar
- mercurial
- version_check
- uninstall_non_local_distutils
- pep518_uses_build_env
- install_package_with_root
- install_editable_with_prefix
- install_user_wheel
- install_from_current_directory_into_usersite
- uninstall_editable_from_usersite
- uninstall_from_usersite_with_dist_in_global_site
- build_env_isolation
- user_config_accepted
- )
-
- distutils_install_for_testing
-
- # generate the expression to exclude failing tests
- local exclude_expr
- printf -v exclude_expr "or %s " "${exclude_tests[@]}" || die
- exclude_expr="not (${exclude_expr#or })" || die
-
- local -x GENTOO_PIP_TESTING=1 \
- PATH="${TEST_DIR}/scripts:${PATH}" \
- PYTHONPATH="${TEST_DIR}/lib:${BUILD_DIR}/lib"
-
- pytest -vv \
- -k "${exclude_expr}" \
- -m "not network" \
- || die "Tests fail with ${EPYTHON}"
-}
-
-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"; import pip.__main__; sys.exit(pip.__main__._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
-}
diff --git a/dev-python/pip/pip-20.2.ebuild b/dev-python/pip/pip-20.2.ebuild
deleted file mode 100644
index 8da2d952643e..000000000000
--- a/dev-python/pip/pip-20.2.ebuild
+++ /dev/null
@@ -1,145 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-DISTUTILS_USE_SETUPTOOLS=rdepend
-PYTHON_COMPAT=( python2_7 python3_{6,7,8,9} pypy3 )
-PYTHON_REQ_USE="ssl(+),threads(+)"
-
-inherit bash-completion-r1 distutils-r1 multiprocessing
-
-SETUPTOOLS_PV="44.0.0"
-WHEEL_PV="0.34.2"
-
-DESCRIPTION="Installs python packages -- replacement for easy_install"
-HOMEPAGE="https://pip.pypa.io/ 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/py2.py3/s/setuptools/setuptools-${SETUPTOOLS_PV}-py2.py3-none-any.whl
- https://files.pythonhosted.org/packages/py2.py3/w/wheel/wheel-${WHEEL_PV}-py2.py3-none-any.whl
- )
-"
-# PyPI archive does not have tests, so we need to download from GitHub.
-# setuptools & wheel .whl files are required for testing, exact version is not very important.
-
-LICENSE="MIT"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
-SLOT="0"
-IUSE="test -vanilla"
-
-# disable-system-install patch breaks tests
-RESTRICT="!test? ( test )"
-
-RDEPEND="
- >=dev-python/setuptools-39.2.0[${PYTHON_USEDEP}]
-"
-DEPEND="
- ${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_gen_cond_dep 'dev-python/enum34[${PYTHON_USEDEP}]' -2)
- )
-"
-
-python_prepare_all() {
- local PATCHES=(
- "${FILESDIR}/${PN}-19.3-disable-version-check.patch"
- "${FILESDIR}/${PN}-20.2-no-coverage.patch"
- )
- if ! use vanilla; then
- PATCHES+=( "${FILESDIR}/pip-20.0.2-disable-system-install.patch" )
- fi
-
- # TODO
- rm tests/functional/test_new_resolver_user.py || die
-
- distutils-r1_python_prepare_all
-
- if use test; then
- mkdir tests/data/common_wheels/ || die
- cp "${DISTDIR}"/setuptools-${SETUPTOOLS_PV}-py2.py3-none-any.whl \
- tests/data/common_wheels/ || die
-
- cp "${DISTDIR}"/wheel-${WHEEL_PV}-py2.py3-none-any.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 -a exclude_tests
-
- # these will be built in to an expression passed to pytest to exclude
- exclude_tests=(
- git
- svn
- bazaar
- mercurial
- version_check
- uninstall_non_local_distutils
- pep518_uses_build_env
- install_package_with_root
- install_editable_with_prefix
- install_user_wheel
- install_from_current_directory_into_usersite
- uninstall_editable_from_usersite
- uninstall_from_usersite_with_dist_in_global_site
- build_env_isolation
- user_config_accepted
- )
-
- distutils_install_for_testing
-
- # generate the expression to exclude failing tests
- local exclude_expr
- printf -v exclude_expr "or %s " "${exclude_tests[@]}" || die
- exclude_expr="not (${exclude_expr#or })" || die
-
- local -x GENTOO_PIP_TESTING=1 \
- PATH="${TEST_DIR}/scripts:${PATH}" \
- PYTHONPATH="${TEST_DIR}/lib:${BUILD_DIR}/lib"
-
- pytest -vv \
- -k "${exclude_expr}" \
- -m "not network" \
- || die "Tests fail with ${EPYTHON}"
-}
-
-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"; import pip.__main__; sys.exit(pip.__main__._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
-}
diff --git a/dev-python/pip/pip-24.0.ebuild b/dev-python/pip/pip-24.0.ebuild
new file mode 100644
index 000000000000..ffcadb6fa1cb
--- /dev/null
+++ b/dev-python/pip/pip-24.0.ebuild
@@ -0,0 +1,145 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# please bump dev-python/ensurepip-pip along with this package!
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_TESTED=( python3_{10..13} )
+PYTHON_COMPAT=( "${PYTHON_TESTED[@]}" pypy3 )
+PYTHON_REQ_USE="ssl(+),threads(+)"
+
+inherit bash-completion-r1 distutils-r1
+
+DESCRIPTION="The PyPA recommended tool for installing Python packages"
+HOMEPAGE="
+ https://pip.pypa.io/en/stable/
+ https://pypi.org/project/pip/
+ https://github.com/pypa/pip/
+"
+SRC_URI="
+ https://github.com/pypa/pip/archive/${PV}.tar.gz -> ${P}.gh.tar.gz
+"
+
+LICENSE="MIT"
+# bundled deps
+LICENSE+=" Apache-2.0 BSD BSD-2 ISC LGPL-2.1+ MPL-2.0 PSF-2"
+SLOT="0"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
+IUSE="test-rust"
+
+RDEPEND="
+ >=dev-python/setuptools-39.2.0[${PYTHON_USEDEP}]
+"
+BDEPEND="
+ ${RDEPEND}
+ test? (
+ $(python_gen_cond_dep '
+ dev-python/ensurepip-setuptools
+ dev-python/ensurepip-wheel
+ dev-python/freezegun[${PYTHON_USEDEP}]
+ dev-python/pretend[${PYTHON_USEDEP}]
+ dev-python/pytest-xdist[${PYTHON_USEDEP}]
+ dev-python/scripttest[${PYTHON_USEDEP}]
+ dev-python/tomli-w[${PYTHON_USEDEP}]
+ dev-python/virtualenv[${PYTHON_USEDEP}]
+ dev-python/werkzeug[${PYTHON_USEDEP}]
+ dev-python/wheel[${PYTHON_USEDEP}]
+ test-rust? (
+ dev-python/cryptography[${PYTHON_USEDEP}]
+ )
+ ' "${PYTHON_TESTED[@]}")
+ )
+"
+
+distutils_enable_tests pytest
+
+python_prepare_all() {
+ local PATCHES=(
+ "${FILESDIR}/pip-23.1-no-coverage.patch"
+ # https://github.com/pypa/pip/pull/12415
+ "${FILESDIR}/pip-23.3.1-no-color.patch"
+ )
+
+ distutils-r1_python_prepare_all
+
+ if use test; then
+ local wheels=(
+ "${BROOT}"/usr/lib/python/ensurepip/{setuptools,wheel}-*.whl
+ )
+ mkdir tests/data/common_wheels/ || die
+ cp "${wheels[@]}" tests/data/common_wheels/ || die
+ fi
+}
+
+python_compile_all() {
+ # '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"; __file__ = ""; from pip._internal.cli.main import main; sys.exit(main())'
+ "${EPYTHON}" -c "${pipcmd}" completion --bash > completion.bash || die
+ "${EPYTHON}" -c "${pipcmd}" completion --zsh > completion.zsh || die
+}
+
+python_test() {
+ if ! has "${EPYTHON}" "${PYTHON_TESTED[@]/_/.}"; then
+ einfo "Skipping tests on ${EPYTHON}"
+ return 0
+ fi
+
+ local EPYTEST_DESELECT=(
+ tests/functional/test_inspect.py::test_inspect_basic
+ # Internet
+ tests/functional/test_config_settings.py::test_backend_sees_config_via_sdist
+ tests/functional/test_config_settings.py::test_config_settings_implies_pep517
+ tests/functional/test_install.py::test_double_install_fail
+ tests/functional/test_install.py::test_editable_install__local_dir_setup_requires_with_pyproject
+ tests/functional/test_install.py::test_link_hash_in_dep_fails_require_hashes
+ tests/functional/test_install_config.py::test_prompt_for_keyring_if_needed
+ )
+
+ if ! has_version "dev-python/cryptography[${PYTHON_USEDEP}]"; then
+ EPYTEST_DESELECT+=(
+ tests/functional/test_install.py::test_install_sends_client_cert
+ tests/functional/test_install_config.py::test_do_not_prompt_for_authentication
+ tests/functional/test_install_config.py::test_prompt_for_authentication
+ tests/functional/test_install_config.py::test_prompt_for_keyring_if_needed
+ )
+ fi
+
+ case ${EPYTHON} in
+ python3.13)
+ EPYTEST_DESELECT+=(
+ # hacky upstream time mocking stopped working, they have it
+ # failing on CI already too
+ tests/unit/test_base_command.py::test_log_command_success
+ tests/unit/test_base_command.py::test_log_command_error
+ tests/unit/test_base_command.py::test_log_file_command_error
+ )
+ ;;
+ python3.10)
+ EPYTEST_DESELECT+=(
+ # no clue why they fail
+ tests/unit/test_base_command.py::test_base_command_global_tempdir_cleanup
+ tests/unit/test_base_command.py::test_base_command_local_tempdir_cleanup
+ tests/unit/test_base_command.py::test_base_command_provides_tempdir_helpers
+ )
+ ;;
+ esac
+
+ local -x PIP_DISABLE_PIP_VERSION_CHECK=1
+ local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
+ local EPYTEST_XDIST=1
+ epytest -m "not network" -o tmp_path_retention_policy=all
+}
+
+python_install_all() {
+ local DOCS=( AUTHORS.txt docs/html/**/*.rst )
+ distutils-r1_python_install_all
+
+ newbashcomp completion.bash pip
+
+ insinto /usr/share/zsh/site-functions
+ newins completion.zsh _pip
+}