From b03ba5332bb216794d0da34050728243e47477d3 Mon Sep 17 00:00:00 2001 From: openeuler-ci-bot <80474298@qq.com> Date: Fri, 18 Dec 2020 23:58:53 +0800 Subject: [PATCH 1/2] [patch tracking] 20201218235849755633 - https://github.com/pypa/pip/commit/89d50dd833c21073a6080311ec0f3e4a3c0878b8 --- ...0dd833c21073a6080311ec0f3e4a3c0878b8.patch | 74 +++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 89d50dd833c21073a6080311ec0f3e4a3c0878b8.patch diff --git a/89d50dd833c21073a6080311ec0f3e4a3c0878b8.patch b/89d50dd833c21073a6080311ec0f3e4a3c0878b8.patch new file mode 100644 index 0000000..60c7447 --- /dev/null +++ b/89d50dd833c21073a6080311ec0f3e4a3c0878b8.patch @@ -0,0 +1,74 @@ +diff --git a/news/1884.feature.rst b/news/1884.feature.rst +new file mode 100644 +index 0000000000..4b0b4180c3 +--- /dev/null ++++ b/news/1884.feature.rst +@@ -0,0 +1 @@ ++Add ``--ignore-requires-python`` support to pip download. +diff --git a/src/pip/_internal/commands/download.py b/src/pip/_internal/commands/download.py +index 7405870aef..7509397240 100644 +--- a/src/pip/_internal/commands/download.py ++++ b/src/pip/_internal/commands/download.py +@@ -56,6 +56,7 @@ def add_options(self): + self.cmd_opts.add_option(cmdoptions.no_build_isolation()) + self.cmd_opts.add_option(cmdoptions.use_pep517()) + self.cmd_opts.add_option(cmdoptions.no_use_pep517()) ++ self.cmd_opts.add_option(cmdoptions.ignore_requires_python()) + + self.cmd_opts.add_option( + '-d', '--dest', '--destination-dir', '--destination-directory', +@@ -96,6 +97,7 @@ def run(self, options, args): + options=options, + session=session, + target_python=target_python, ++ ignore_requires_python=options.ignore_requires_python, + ) + + req_tracker = self.enter_context(get_requirement_tracker()) +@@ -122,6 +124,7 @@ def run(self, options, args): + preparer=preparer, + finder=finder, + options=options, ++ ignore_requires_python=options.ignore_requires_python, + py_version_info=options.python_version, + ) + +diff --git a/tests/functional/test_download.py b/tests/functional/test_download.py +index 8a816b63b4..24bc4ddbcc 100644 +--- a/tests/functional/test_download.py ++++ b/tests/functional/test_download.py +@@ -530,6 +530,34 @@ def make_args(python_version): + script.pip(*args) # no exception + + ++def test_download_ignore_requires_python_dont_fail_with_wrong_python( ++ script, ++ with_wheel, ++): ++ """ ++ Test that --ignore-requires-python ignores Requires-Python check. ++ """ ++ wheel_path = make_wheel_with_python_requires( ++ script, ++ "mypackage", ++ python_requires="==999", ++ ) ++ wheel_dir = os.path.dirname(wheel_path) ++ ++ result = script.pip( ++ "download", ++ "--ignore-requires-python", ++ "--no-index", ++ "--find-links", ++ wheel_dir, ++ "--only-binary=:all:", ++ "--dest", ++ ".", ++ "mypackage==1.0", ++ ) ++ result.did_create(Path('scratch') / 'mypackage-1.0-py2.py3-none-any.whl') ++ ++ + def test_download_specify_abi(script, data): + """ + Test using "pip download --abi" to download a .whl archive -- Gitee From 41aea29b7bb47ecc9d35a7f1d93af64821227919 Mon Sep 17 00:00:00 2001 From: openeuler-ci-bot <80474298@qq.com> Date: Fri, 18 Dec 2020 23:58:54 +0800 Subject: [PATCH 2/2] [patch tracking] 20201218235849755633 - update spec file --- python-pip.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 3d035b5..1ff3719 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -6,7 +6,7 @@ pip is the package installer for Python. You can use pip to install packages fro %global bashcompdir %(b=$(pkg-config --variable=completionsdir bash-completion 2>/dev/null); echo ${b:-%{_sysconfdir}/bash_completion.d}) Name: python-%{srcname} Version: 20.2.2 -Release: 3 +Release: 4 Summary: A tool for installing and managing Python packages License: MIT and Python and ASL 2.0 and BSD and ISC and LGPLv2 and MPLv2.0 and (ASL 2.0 or BSD) URL: http://www.pip-installer.org @@ -16,6 +16,7 @@ Patch1: allow-stripping-given-prefix-from-wheel-RECORD-files.patch Patch2: emit-a-warning-when-running-with-root-privileges.patch Patch3: remove-existing-dist-only-if-path-conflicts.patch Patch6000: dummy-certifi.patch +Patch6001: 89d50dd833c21073a6080311ec0f3e4a3c0878b8.patch Source10: pip-allow-older-versions.patch %description %{_description} @@ -112,6 +113,9 @@ install -p dist/%{python_wheelname} -t %{buildroot}%{python_wheeldir} %{python_wheeldir}/%{python_wheelname} %changelog +* 20201218235849755633 patch-tracking 20.2.2-4 +- append patch file of upstream repository from <89d50dd833c21073a6080311ec0f3e4a3c0878b8> to <89d50dd833c21073a6080311ec0f3e4a3c0878b8> + * Wed Nov 4 2020 wangjie -20.2.2-3 - Type:NA - ID:NA @@ -161,4 +165,4 @@ install -p dist/%{python_wheelname} -t %{buildroot}%{python_wheeldir} - DESC: Synchronize a patch * Mon Sep 23 2019 openEuler Buildteam - 18.0-6 -- Package init +- Package init \ No newline at end of file -- Gitee