From 3d497622c6f95eb3e177d2134378a03ab517d1d1 Mon Sep 17 00:00:00 2001 From: Patrick McLean Date: Fri, 22 Nov 2019 16:13:03 -0800 Subject: [PATCH] dev-python/pip-19.3.1-r1: Revbump, update install patch for --prefix Copyright: Sony Interactive Entertainment Inc. Package-Manager: Portage-2.3.79, Repoman-2.3.18 Signed-off-by: Patrick McLean --- .../pip-19.3.1-disable-system-install.patch | 17 +++ dev-python/pip/pip-19.3.1-r1.ebuild | 119 ++++++++++++++++++ 2 files changed, 136 insertions(+) create mode 100644 dev-python/pip/files/pip-19.3.1-disable-system-install.patch create mode 100644 dev-python/pip/pip-19.3.1-r1.ebuild diff --git a/dev-python/pip/files/pip-19.3.1-disable-system-install.patch b/dev-python/pip/files/pip-19.3.1-disable-system-install.patch new file mode 100644 index 000000000000..70583957bd74 --- /dev/null +++ b/dev-python/pip/files/pip-19.3.1-disable-system-install.patch @@ -0,0 +1,17 @@ +install: Raise an error to avoid breaking python-exec + +Running pip without --target, --root, or --user will result in packages +being installed systemwide. This has a tendency to break python-exec if +setuptools gets installed or upgraded. + +--- pip-19.1/src/pip/_internal/commands/install.py ++++ pip-19.1/src/pip/_internal/commands/install.py +@@ -246,6 +246,9 @@ class InstallCommand(RequirementCommand): + if options.upgrade: + upgrade_strategy = options.upgrade_strategy + ++ if not any((options.use_user_site, options.target_dir, options.root_path, options.prefix_path)): ++ raise CommandError("(Gentoo) Please run pip with the --user option to avoid breaking python-exec") ++ + if options.build_dir: + options.build_dir = os.path.abspath(options.build_dir) diff --git a/dev-python/pip/pip-19.3.1-r1.ebuild b/dev-python/pip/pip-19.3.1-r1.ebuild new file mode 100644 index 000000000000..e631044bd5aa --- /dev/null +++ b/dev-python/pip/pip-19.3.1-r1.ebuild @@ -0,0 +1,119 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python2_7 python3_{5,6,7} pypy{,3} ) +PYTHON_REQ_USE="ssl(+),threads(+)" + +inherit bash-completion-r1 distutils-r1 multiprocessing + +SETUPTOOLS_PV="41.4.0" +WHEEL_PV="0.33.6" + +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="~amd64 ~x86" +SLOT="0" +IUSE="test -vanilla" + +# disable-system-install patch breaks tests +RESTRICT="!vanilla? ( test )" + +RDEPEND=" + >=dev-python/setuptools-39.2.0[${PYTHON_USEDEP}] +" +DEPEND=" + ${RDEPEND} + test? ( + dev-python/freezegun[${PYTHON_USEDEP}] + dev-python/mock[${PYTHON_USEDEP}] + dev-python/pretend[${PYTHON_USEDEP}] + "${COMPLETION}" || die + newbashcomp "${COMPLETION}" ${PN} + + ${PYTHON} -c "${pipcmd}" completion --zsh > "${COMPLETION}" || die + insinto /usr/share/zsh/site-functions + newins "${COMPLETION}" _pip +} -- 2.26.2