From: "Maxim Koltsov" <maksbotan@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/pip/, dev-python/pip/files/
Date: Sun, 28 Apr 2019 08:15:39 +0000 (UTC) [thread overview]
Message-ID: <1556438512.64dad89900c7b185a01a2b64f14a57188fa4ed74.maksbotan@gentoo> (raw)
commit: 64dad89900c7b185a01a2b64f14a57188fa4ed74
Author: Maxim Koltsov <maksbotan <AT> gentoo <DOT> org>
AuthorDate: Sat Apr 27 19:27:04 2019 +0000
Commit: Maxim Koltsov <maksbotan <AT> gentoo <DOT> org>
CommitDate: Sun Apr 28 08:01:52 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=64dad899
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 <AT> gentoo.org>
dev-python/pip/Manifest | 1 +
.../files/pip-19.1-disable-system-install.patch | 17 +++++++
.../pip/files/pip-19.1-disable-version-check.patch | 19 ++++++++
dev-python/pip/pip-19.1.ebuild | 53 ++++++++++++++++++++++
4 files changed, 90 insertions(+)
diff --git a/dev-python/pip/Manifest b/dev-python/pip/Manifest
index ca3c8caf9d8..f816ec613bd 100644
--- a/dev-python/pip/Manifest
+++ b/dev-python/pip/Manifest
@@ -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
diff --git a/dev-python/pip/files/pip-19.1-disable-system-install.patch b/dev-python/pip/files/pip-19.1-disable-system-install.patch
new file mode 100644
index 00000000000..bc88ef715a2
--- /dev/null
+++ b/dev-python/pip/files/pip-19.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 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)
diff --git a/dev-python/pip/files/pip-19.1-disable-version-check.patch b/dev-python/pip/files/pip-19.1-disable-version-check.patch
new file mode 100644
index 00000000000..a46a47f0fc6
--- /dev/null
+++ b/dev-python/pip/files/pip-19.1-disable-version-check.patch
@@ -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(
diff --git a/dev-python/pip/pip-19.1.ebuild b/dev-python/pip/pip-19.1.ebuild
new file mode 100644
index 00000000000..f549d358e60
--- /dev/null
+++ b/dev-python/pip/pip-19.1.ebuild
@@ -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
+}
next reply other threads:[~2019-04-28 8:15 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-28 8:15 Maxim Koltsov [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-04-28 16:55 [gentoo-commits] repo/gentoo:master commit in: dev-python/pip/, dev-python/pip/files/ Michał Górny
2024-11-09 16:46 Michał Górny
2024-11-09 13:30 Michał Górny
2024-06-23 17:33 Michał Górny
2024-06-22 16:39 Michał Górny
2023-04-15 19:39 Michał Górny
2022-07-21 20:17 Michał Górny
2022-06-12 14:25 Michał Górny
2022-05-22 7:13 Michał Górny
2021-10-23 8:44 Michał Górny
2021-08-01 8:17 Michał Górny
2021-06-09 20:17 Michał Górny
2021-04-25 10:36 Michał Górny
2020-07-29 8:03 Michał Górny
2020-07-29 8:03 Michał Górny
2020-05-28 18:35 Michał Górny
2020-02-22 20:22 Andreas Sturmlechner
2019-12-06 1:30 Patrick McLean
2019-10-22 20:38 Maxim Koltsov
2018-06-26 3:39 Tim Harder
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1556438512.64dad89900c7b185a01a2b64f14a57188fa4ed74.maksbotan@gentoo \
--to=maksbotan@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox