diff options
| author | Jeffery To <jeffery.to@gmail.com> | 2023-05-18 13:36:24 +0800 |
|---|---|---|
| committer | Jeffery To <jeffery.to@gmail.com> | 2023-05-26 22:06:08 +0800 |
| commit | eee273507b868ad5f6f7e744d513c85330967906 (patch) | |
| tree | bd942e3df1a9037a0c88655dff34ebfc3354faa8 /lang/python/python-pip/patches | |
| parent | d53475ac21cf79bef902b61fac69ffe25a3aad2f (diff) | |
python3: Split pip into separate source package
Packaging pip from a separate source package allows it to stay updated
with upstream.
Host pip will remain installed as part of python3. Host pip is used in a
much more controlled way and so is less critical for it to track
upstream.
This also removes the python-pip-conf package and installs the pip.conf
file as part of python3-pip.
The patch 003-disable-pip-version-check.patch is originally from Debian:
https://salsa.debian.org/python-team/packages/python-pip/-/blob/bb079efb8c6dd2c284eee94cf90e61bce19a6f73/debian/patches/disable-pip-version-check.patch
pip was in a separate source package that was removed in
a53d0c5a403d1669e2cf6c59c2be6a9d3ed633a0; this work is not based on that
earlier package.
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
Diffstat (limited to 'lang/python/python-pip/patches')
3 files changed, 44 insertions, 0 deletions
diff --git a/lang/python/python-pip/patches/001-pyproject-hooks-pyc-fix.patch b/lang/python/python-pip/patches/001-pyproject-hooks-pyc-fix.patch new file mode 100644 index 000000000..27681c1af --- /dev/null +++ b/lang/python/python-pip/patches/001-pyproject-hooks-pyc-fix.patch @@ -0,0 +1,13 @@ +--- a/src/pip/_vendor/pyproject_hooks/_in_process/__init__.py ++++ b/src/pip/_vendor/pyproject_hooks/_in_process/__init__.py +@@ -11,8 +11,8 @@ try: + except AttributeError: + # Python 3.8 compatibility + def _in_proc_script_path(): +- return resources.path(__package__, '_in_process.py') ++ return resources.path(__package__, '_in_process.pyc') + else: + def _in_proc_script_path(): + return resources.as_file( +- resources.files(__package__).joinpath('_in_process.py')) ++ resources.files(__package__).joinpath('_in_process.pyc')) diff --git a/lang/python/python-pip/patches/002-pip-runner-pyc-fix.patch b/lang/python/python-pip/patches/002-pip-runner-pyc-fix.patch new file mode 100644 index 000000000..4616fe065 --- /dev/null +++ b/lang/python/python-pip/patches/002-pip-runner-pyc-fix.patch @@ -0,0 +1,11 @@ +--- a/src/pip/_internal/build_env.py ++++ b/src/pip/_internal/build_env.py +@@ -54,7 +54,7 @@ def get_runnable_pip() -> str: + # case, we can use that directly. + return str(source) + +- return os.fsdecode(source / "__pip-runner__.py") ++ return os.fsdecode(source / "__pip-runner__.pyc") + + + def _get_system_sitepackages() -> Set[str]: diff --git a/lang/python/python-pip/patches/003-disable-pip-version-check.patch b/lang/python/python-pip/patches/003-disable-pip-version-check.patch new file mode 100644 index 000000000..87a8178a7 --- /dev/null +++ b/lang/python/python-pip/patches/003-disable-pip-version-check.patch @@ -0,0 +1,20 @@ +From: Barry Warsaw <barry@python.org> +Date: Fri, 18 Nov 2016 17:07:47 -0500 +Subject: Set --disable-pip-version-check=True by default. + +Patch-Name: disable-pip-version-check.patch +--- + src/pip/_internal/cli/cmdoptions.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/src/pip/_internal/cli/cmdoptions.py ++++ b/src/pip/_internal/cli/cmdoptions.py +@@ -892,7 +892,7 @@ disable_pip_version_check: Callable[..., + "--disable-pip-version-check", + dest="disable_pip_version_check", + action="store_true", +- default=False, ++ default=True, + help="Don't periodically check PyPI to determine whether a new version " + "of pip is available for download. Implied with --no-index.", + ) |
