From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id AF571138359 for ; Wed, 29 Jul 2020 08:03:09 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id AEEDBE0C2D; Wed, 29 Jul 2020 08:03:08 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 8A3AEE0C2D for ; Wed, 29 Jul 2020 08:03:08 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 7046C34F13C for ; Wed, 29 Jul 2020 08:03:07 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id F13DB2F5 for ; Wed, 29 Jul 2020 08:03:05 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1596009775.dba99a9f6104da8a3a9c5ae5dbc8770b01332c3c.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/pip/, dev-python/pip/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-python/pip/Manifest dev-python/pip/files/pip-20.2-no-coverage.patch dev-python/pip/pip-20.2.ebuild X-VCS-Directories: dev-python/pip/files/ dev-python/pip/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: dba99a9f6104da8a3a9c5ae5dbc8770b01332c3c X-VCS-Branch: master Date: Wed, 29 Jul 2020 08:03:05 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: cf0c317d-63c0-4cd5-93a5-4394da272872 X-Archives-Hash: b081f670ef0f863ccf1733bbd2a3527c commit: dba99a9f6104da8a3a9c5ae5dbc8770b01332c3c Author: Michał Górny gentoo org> AuthorDate: Wed Jul 29 05:14:10 2020 +0000 Commit: Michał Górny gentoo org> CommitDate: Wed Jul 29 08:02:55 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dba99a9f dev-python/pip: Bump to 20.2 Signed-off-by: Michał Górny gentoo.org> dev-python/pip/Manifest | 1 + dev-python/pip/files/pip-20.2-no-coverage.patch | 163 ++++++++++++++++++++++++ dev-python/pip/pip-20.2.ebuild | 145 +++++++++++++++++++++ 3 files changed, 309 insertions(+) diff --git a/dev-python/pip/Manifest b/dev-python/pip/Manifest index f49c838f90f..b0bc2c548cb 100644 --- a/dev-python/pip/Manifest +++ b/dev-python/pip/Manifest @@ -1,6 +1,7 @@ DIST pip-19.3.1.tar.gz 6409819 BLAKE2B b3aacd0bee60400a1f30b4be57871002072e5cc7a86e76cca1848e977ebdc85b6e282fc521c19bf7a518d1aef3280133fcd65a431cb2a16e202dd7721c5b97ad SHA512 39446c0ab6e4495d98f22923a2a76901b024d9047b60d92580b21d447a718e5285cfd66f8ad0c20befcfe1abc7f06be29b6a5644d1b30265d3b67399fe76e033 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.tar.gz 8715960 BLAKE2B dbcec865314ba0b65112e42477a2c48dc9a60592a07a834d3886025489fcd8de4c83733044d1ad84dd87af084677b2f406d5d8faa301853ab844b3770be168de SHA512 77db7c618b492cbdef54ef98d4e9a94735a809148fb08ef7d065fbeaf047ced26ddc20d0395a0b2db079c66175a267fc15717a24def70392182326b2c659e6f1 DIST pip-9.0.1.tar.gz 1197370 BLAKE2B 3618161690d5e0a38d141f9b51baea4aaa3fdc225664ef180bbeecf6e2df95e9ea4f97c63fe3a68f84f4fb5ebcc74e316827253c7e07b03565e58113bbaa918a SHA512 ee59efb4b009ff6543b7afdea99b9cbbee1981ecc03af586acda76674024d3b66dab23049e68f3da9448734984619fc1eaba6e965c9dd3d731973376c8a42e25 DIST setuptools-41.4.0-py2.py3-none-any.whl 580302 BLAKE2B 58dc2d48445406f7467bfb0934dc507e8a569e4759bfcc95287cfb21b5b1a7bcab061656a29a8b4976ee3ae12a3adca570035ae4a6d9df09ae7a799857775d36 SHA512 a27b38d596931dfef81d705d05689b7748ce0e02d21af4a37204fc74b0913fa7241b8135535eb7749f09af361cad90c475af98493fef11c4ad974780ee01243d DIST setuptools-44.0.0-py2.py3-none-any.whl 583230 BLAKE2B 823e6792471660f247e30a938aa869d345a63db7294e5f9b4bd88f15a7694779011d29740fe317149620985f705fc6e18cbb07a18e5680cc11d7c229ffbc74f6 SHA512 7006fd303181afbeeec0e30cafb9fd1e4d3c6f55cfdd6343fedbc32b17dbb96b3d96ae37f4db27bfb168738727474cf425904ec280ff1d2b789fc48077a8fa84 diff --git a/dev-python/pip/files/pip-20.2-no-coverage.patch b/dev-python/pip/files/pip-20.2-no-coverage.patch new file mode 100644 index 00000000000..55be5b8c971 --- /dev/null +++ b/dev-python/pip/files/pip-20.2-no-coverage.patch @@ -0,0 +1,163 @@ +From 43389903a55a5432ca8556f42fb2252c91c7ca45 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= +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/pip-20.2.ebuild b/dev-python/pip/pip-20.2.ebuild new file mode 100644 index 00000000000..8da2d952643 --- /dev/null +++ b/dev-python/pip/pip-20.2.ebuild @@ -0,0 +1,145 @@ +# 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}] + "${COMPLETION}" || die + newbashcomp "${COMPLETION}" ${PN} + + ${PYTHON} -c "${pipcmd}" completion --zsh > "${COMPLETION}" || die + insinto /usr/share/zsh/site-functions + newins "${COMPLETION}" _pip +}