diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2021-03-03 10:28:17 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2021-03-03 10:28:17 +0000 |
commit | d99093fb4bb5652015c06274d64083daa2439e4f (patch) | |
tree | cf61513204d97974179580065e85df5c8009087c /dev-python/pip | |
parent | 463397cf1e064185110fe57c568d73f99a06f5d1 (diff) |
gentoo resync : 03.03.2021
Diffstat (limited to 'dev-python/pip')
-rw-r--r-- | dev-python/pip/Manifest | 9 | ||||
-rw-r--r-- | dev-python/pip/files/pip-20.2-no-coverage.patch | 163 | ||||
-rw-r--r-- | dev-python/pip/pip-20.3.3.ebuild | 150 | ||||
-rw-r--r-- | dev-python/pip/pip-21.0.1.ebuild | 2 | ||||
-rw-r--r-- | dev-python/pip/pip-21.0.ebuild | 121 |
5 files changed, 2 insertions, 443 deletions
diff --git a/dev-python/pip/Manifest b/dev-python/pip/Manifest index 0143b43e48be..e8495bb45e6d 100644 --- a/dev-python/pip/Manifest +++ b/dev-python/pip/Manifest @@ -1,15 +1,8 @@ AUX pip-19.3-disable-version-check.patch 872 BLAKE2B b0398674f56b78a066c4308f0a8ee0272c5c4c3cb569e6c300ac62fc9fbe8ec2a1bfe257047c15ddcf9cc44c47b7f8b9ab99e17b722bd6ae4cf9dc2a168e01d6 SHA512 1ece773f66556e4380eabf76490430e8fbec23f7cfad27dac02c7e49f7136b632515ef04843e89dfae42c095dbf5280d64e61da1544801c998f802aa59be8e22 AUX pip-20.0.2-disable-system-install.patch 1298 BLAKE2B a384ee2114e59b8bc719fc14270cf6efbe8914854c404395beb1126db3278683b940e8fcfee83423d78e2aed6521e0bc57566ab0f5618f473262bbd9b7b0bffa SHA512 d2772105d4f4f880606e1e8ab3381af6768a96604a5fdcaa155dd42f8eea731c3a1b733b027d3e591d81f962ba14758b19da4a2c6c12946cd9a9d77c51ca4e78 -AUX pip-20.2-no-coverage.patch 6154 BLAKE2B 743dcacd3107d9c6447197dd01bc85b1b16db5b1da3bf5f84e73801e645848a98854f350d958056eb17aa6b87f8bb2557a27e3bd78582958c3b37cb6ce61d7ce SHA512 67ea11c56b6a7b02faae28c9d941015ca2ba9c125dfcaf01eeaba7717cfb22f23fb84c28f993202f7b648ee64741baaf7545e9951be840d378e39d3af0a60fd0 AUX pip-21.0-no-coverage.patch 2082 BLAKE2B ad2efd846eabc81f159cb9c45773258fa3e242ae619428c264bff738456d3957a229807812fd945744163b0d70bea70da36e659d68530c33f810e96d311de9f5 SHA512 4f8e2242897092e41e156b01a35ca2a0c1ddcaa1e4e5347b6fef0f9ae171a8d7283c346c0e0c4b013e62df29eb053095d6d8caf754d162fce89937270f0bf1ae -DIST pip-20.3.3.tar.gz 8757085 BLAKE2B dce60cd59669929957715d6be70da4924c3a89bb4129f0972516bde8ccca751b4f327dd2f44a06cd0b48d092f8d520d1ec236ee812f768282004b34f1fabb798 SHA512 362d20e5d2665fa6211cf3836ca02a0340fb34ecde1d5902eecae744eb655d7dcfed0bd464e9db186b87b63a7aaf275e43645cf6321bdddd44b62787de84d87b DIST pip-21.0.1.tar.gz 8772082 BLAKE2B 2fdd78e2db8ceda2bd21fdeb4d29c0c2eda412827b87cc97ec1996a5b71b9c6e5938c0a6ef696163780bbbc55d81b8b3b1b6e2e79b05fbe9ce4bdd52e3ebdf13 SHA512 2db5397f4ca3a3f56f5add3f827bf1f0a4296019703438d68498266b9d2559b6baa3132061c5ad4c2a08bec6e76a2768763fdca02d86cf32aadd4640afbf3664 -DIST pip-21.0.tar.gz 8770962 BLAKE2B 5a246e40a8b2ea5ceda27bec27e9bb6390613e28c301ed79fd95886c850a29ee1c0261f2dd69f1c2485dd72ec3010f61c4e783ed707a40630534790eba748c4b SHA512 ac77a7204423f1fdc3a4d328dab1860258efccde0123cff3217f357637c4ce3d85772ab81a230122ff813be2cfa40f2862e5d499390289efe1dcde3a31a42264 -DIST setuptools-44.0.0-py2.py3-none-any.whl 583230 BLAKE2B 823e6792471660f247e30a938aa869d345a63db7294e5f9b4bd88f15a7694779011d29740fe317149620985f705fc6e18cbb07a18e5680cc11d7c229ffbc74f6 SHA512 7006fd303181afbeeec0e30cafb9fd1e4d3c6f55cfdd6343fedbc32b17dbb96b3d96ae37f4db27bfb168738727474cf425904ec280ff1d2b789fc48077a8fa84 DIST setuptools-51.3.3-py3-none-any.whl 786243 BLAKE2B cc8a98cdfd5cb78a342a3d50049c0ebd0965451e9bd4050b7a133346f505a17842a498531ade9bf932064a6cac81277ecf60d94ef94faa39b78740de87f9fd86 SHA512 1d4f29e392371b7f0e427d0570fddbdd1204f6c98e48a0a289db23b20f7c048551584ac946e30b90d720cce4f508b3c39208e9a70f87067d66734432963d141c -DIST wheel-0.34.2-py2.py3-none-any.whl 26502 BLAKE2B 3a1bd4571c582245b60ff33c9bf74ff8a2ebafb26e56fc7b9bd215058d059b6bd13bbe21ce46002af257813a54126f27e19253f211e21c4548c7cf84cd15caf7 SHA512 4f1a44f4691ed8baad777d7874f7f4da96a5019eb485fd3a9eed9259aa2a9d5acccc6dc63a72128664347c64ee039a6076c6ca9c3b75a1f94457967864e522ed DIST wheel-0.36.2-py2.py3-none-any.whl 35046 BLAKE2B bc4e8dab7c74eea34d3b4a813b7eaf6295a99a396a861b6cdd76f743043e89140bad132bdd13e385e8945ce02e0798e1d3ac73fc1b23bde5b2a83e4bb4dd5cdc SHA512 6bb5119b4d3704fe1e3c1eaaa3124edab13f61b46f8a0a8e75974fac4e5b25d8b53606071a03a8d8990ad1cfe2ab247ddea260098df2c0c35ae965be47080284 -EBUILD pip-20.3.3.ebuild 4312 BLAKE2B 852a0951b03f2083c3ce3748ec790c6b5da4e86ba16574c9e26ce8ddd4a96a34b9c5fae5ba8f619cd31a3fe134037a3700fecf104fd1a028331f647b8e8bb476 SHA512 c422579be536b602203905ccf81a0c49887fe9b0f2458a984f32fd5d20240a8208f0c4fff80fc4c60e9deb82a68e2680124e02ebaa3581c5be7706d5d71446eb -EBUILD pip-21.0.1.ebuild 3778 BLAKE2B d79c3301b2a44c52eb797396de52694db516fa098a1538a26887e055ca7753573744da31a7162c905595943cea7055ef358752b98ce9b37daf7ef6230fdf809d SHA512 687193ed63f011a4b5c5d280c1a30f2659a298bca75135a47b05669a080a0931aa43ff56afb188f012cff36932e60f4546b801df1bb03c4659638e4e8e8ac3ec -EBUILD pip-21.0.ebuild 3850 BLAKE2B debfeb584693f0f599574d46a27502d7c197e7ab562a8e3089177351591b6bbcac9199acb1a278910cfd6236664a727d4bf70ffbb4a62e5f0708908c2cf3ea06 SHA512 69f446ce6463e692b3b718bc3c902c5d84030ae09481e640f83dec06de4c86ca092564e4d6c5b4ce9413d3290801e3923ad260945a4dbf674665451598db1616 +EBUILD pip-21.0.1.ebuild 3770 BLAKE2B 809223baec949e59ee589a954440349091c03b81c4f3d25e405169c0a678aee6e71ea59e1b84a11b6befc27e69d24600f89b17369c0d03e2b5c5f11715354c8b SHA512 b9283e24bccae8a5c8e1ea6a2cd525079d12b85b1e772434726a74d861686a4411c39a5a81201ad28c64e74d997098bb3e52443bedf827268d4d6b2f80dd11f6 MISC metadata.xml 391 BLAKE2B d8537d1b2f8886d7c30dad3975568e0198a04f16a7ced44f3682f1b865e25f0b7552a640955dd915b2f059eec78eb3f920a0bea0f5f1503f366731a5d20a96c2 SHA512 27ee4b430cd0175c9eecc279765fd617ce5ab55d36932879a0710c2eb66ac2de449de303b1b70fc0ce925666c87008814d64e62d904fc3b9f800380c53478e69 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/pip-20.3.3.ebuild b/dev-python/pip/pip-20.3.3.ebuild deleted file mode 100644 index 8fc9e727b994..000000000000 --- a/dev-python/pip/pip-20.3.3.ebuild +++ /dev/null @@ -1,150 +0,0 @@ -# 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,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/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/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 ~riscv sparc x86 ~x64-macos" -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_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 - # these fail with new setuptools + distutils_install_for_testing - double_install_fail - multiple_exclude_and_normalization - ) - - distutils_install_for_testing --via-root - - # 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-21.0.1.ebuild b/dev-python/pip/pip-21.0.1.ebuild index c5d9fc3fcec4..902858799358 100644 --- a/dev-python/pip/pip-21.0.1.ebuild +++ b/dev-python/pip/pip-21.0.1.ebuild @@ -28,7 +28,7 @@ SRC_URI=" " LICENSE="MIT" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~sparc ~x86 ~x64-macos" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ppc ppc64 ~riscv sparc x86 ~x64-macos" SLOT="0" IUSE="test -vanilla" RESTRICT="!test? ( test )" diff --git a/dev-python/pip/pip-21.0.ebuild b/dev-python/pip/pip-21.0.ebuild deleted file mode 100644 index ca2635d6f3eb..000000000000 --- a/dev-python/pip/pip-21.0.ebuild +++ /dev/null @@ -1,121 +0,0 @@ -# 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-51.3.3-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} - ) -" -# PyPI archive does not have tests, so we need to download from GitHub. - -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}-19.3-disable-version-check.patch" - "${FILESDIR}/${PN}-21.0-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]' - ) - - distutils_install_for_testing --via-root - - local -x GENTOO_PIP_TESTING=1 \ - PATH="${TEST_DIR}/scripts:${PATH}" \ - PYTHONPATH="${TEST_DIR}/lib:${BUILD_DIR}/lib" - - pytest -vv ${deselect[@]/#/--deselect } -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 -} |