mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-07-31 10:58:21 -07:00
dev-python/pip: bump to 19.1
- Bump EAPI to 7 - Fix completion file installation Closes: https://bugs.gentoo.org/671286 Package-Manager: Portage-2.3.63, Repoman-2.3.12 Signed-off-by: Maxim Koltsov <maksbotan@gentoo.org>
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
DIST pip-10.0.1.tar.gz 1246072 BLAKE2B e08607be43e1d7b9c7bbc12dff73bc3170953f48f8f7439a0b27b9d540f23eb3bca7873211a5f1448b5cedd6e8e12983af6fa4666bba3ac4700059d170036733 SHA512 983cce8375ff0304263209c69be16e5be7a58af340b8c3ffddd64fcea130b2f8f8a98305ab31e9c3eed9a0d039c73777c88bde3bf2ea1e184fa3e0a2faa97fd4
|
||||
DIST pip-19.1.tar.gz 1334822 BLAKE2B afc2163c65a5ae181ffcf06f5fd8f321cff7c480d7cfac913b2f883c36840e79232f2a139f05659fc5bb583b8a35bdda583d22db152c8b8290c9e8c66e89dfaf SHA512 b10f6a8e0cc71b4987657acb90e677217a485f3605cca3ac9fe946102a8b6e07346d69952469db264e9aa7753015695818f107e361beab8a9fd0fbd5410900df
|
||||
DIST pip-7.1.2.tar.gz 1049170 BLAKE2B 1461abba4cb80a9a4e806675ca2d996dedeeb8fb38f05b618f98f400475405da018ea6e75663c21b7b7eb5091408d602a3127afeea9a4bd29f075e5eb8042ad0 SHA512 78082afe6b559bf87f91ae9b6d304cfbfce00206e09be42fdae9d449a55cd8d968df6873e834191d0b0e6baae29e72eb3eee42386ff7c5dc9c29b6c28b754449
|
||||
DIST pip-9.0.1.tar.gz 1197370 BLAKE2B 3618161690d5e0a38d141f9b51baea4aaa3fdc225664ef180bbeecf6e2df95e9ea4f97c63fe3a68f84f4fb5ebcc74e316827253c7e07b03565e58113bbaa918a SHA512 ee59efb4b009ff6543b7afdea99b9cbbee1981ecc03af586acda76674024d3b66dab23049e68f3da9448734984619fc1eaba6e965c9dd3d731973376c8a42e25
|
||||
|
||||
17
dev-python/pip/files/pip-19.1-disable-system-install.patch
Normal file
17
dev-python/pip/files/pip-19.1-disable-system-install.patch
Normal file
@@ -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 options.use_user_site and not options.target_dir and not options.root_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)
|
||||
19
dev-python/pip/files/pip-19.1-disable-version-check.patch
Normal file
19
dev-python/pip/files/pip-19.1-disable-version-check.patch
Normal file
@@ -0,0 +1,19 @@
|
||||
Don't check for new versions of pip.
|
||||
|
||||
--- pip-19.1/src/pip/_internal/cli/base_command.py
|
||||
+++ pip-19.1/src/pip/_internal/cli/base_command.py
|
||||
@@ -213,12 +213,8 @@ class Command(object):
|
||||
|
||||
return UNKNOWN_ERROR
|
||||
finally:
|
||||
- allow_version_check = (
|
||||
- # Does this command have the index_group options?
|
||||
- hasattr(options, "no_index") and
|
||||
- # Is this command allowed to perform this check?
|
||||
- not (options.disable_pip_version_check or options.no_index)
|
||||
- )
|
||||
+ # Disabled on Gentoo
|
||||
+ allow_version_check = False
|
||||
# Check if we're using the latest version of pip available
|
||||
if allow_version_check:
|
||||
session = self._build_session(
|
||||
53
dev-python/pip/pip-19.1.ebuild
Normal file
53
dev-python/pip/pip-19.1.ebuild
Normal file
@@ -0,0 +1,53 @@
|
||||
# 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 eutils bash-completion-r1 distutils-r1
|
||||
|
||||
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="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
|
||||
|
||||
LICENSE="MIT"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~amd64-linux ~x86-linux"
|
||||
SLOT="0"
|
||||
IUSE="-vanilla"
|
||||
|
||||
# required test data isn't bundled with the tarball
|
||||
RESTRICT="test"
|
||||
|
||||
DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
python_prepare_all() {
|
||||
local PATCHES=(
|
||||
"${FILESDIR}/${PN}-19.1-disable-version-check.patch"
|
||||
)
|
||||
if ! use vanilla; then
|
||||
PATCHES+=( "${FILESDIR}/pip-19.1-disable-system-install.patch" )
|
||||
fi
|
||||
distutils-r1_python_prepare_all
|
||||
}
|
||||
|
||||
python_install_all() {
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user