diff --git a/30eeb9ceb10bf76316f091e8615a9c3d8025fff0.patch b/30eeb9ceb10bf76316f091e8615a9c3d8025fff0.patch new file mode 100644 index 0000000000000000000000000000000000000000..e0b5f6f8b4b25394b7763a1cf8f8d59842fa2291 --- /dev/null +++ b/30eeb9ceb10bf76316f091e8615a9c3d8025fff0.patch @@ -0,0 +1,89 @@ +diff --git a/news/9193.removal.rst b/news/9193.removal.rst +new file mode 100644 +index 0000000000..5957a55836 +--- /dev/null ++++ b/news/9193.removal.rst +@@ -0,0 +1,2 @@ ++The --build-dir option has been restored as a no-op, to soften the transition ++for tools that still used it. +diff --git a/src/pip/_internal/cli/base_command.py b/src/pip/_internal/cli/base_command.py +index c1522d6391..7f05efb85d 100644 +--- a/src/pip/_internal/cli/base_command.py ++++ b/src/pip/_internal/cli/base_command.py +@@ -199,6 +199,20 @@ def _main(self, args): + ) + options.cache_dir = None + ++ if getattr(options, "build_dir", None): ++ deprecated( ++ reason=( ++ "The -b/--build/--build-dir/--build-directory " ++ "option is deprecated and has no effect anymore." ++ ), ++ replacement=( ++ "use the TMPDIR/TEMP/TMP environment variable, " ++ "possibly combined with --no-clean" ++ ), ++ gone_in="21.1", ++ issue=8333, ++ ) ++ + if '2020-resolver' in options.features_enabled and not PY2: + logger.warning( + "--use-feature=2020-resolver no longer has any effect, " +diff --git a/src/pip/_internal/cli/cmdoptions.py b/src/pip/_internal/cli/cmdoptions.py +index 07d612a6f5..3543ed48bb 100644 +--- a/src/pip/_internal/cli/cmdoptions.py ++++ b/src/pip/_internal/cli/cmdoptions.py +@@ -695,6 +695,14 @@ def _handle_no_cache_dir(option, opt, value, parser): + help="Don't install package dependencies.", + ) # type: Callable[..., Option] + ++build_dir = partial( ++ PipOption, ++ '-b', '--build', '--build-dir', '--build-directory', ++ dest='build_dir', ++ type='path', ++ metavar='dir', ++ help=SUPPRESS_HELP, ++) # type: Callable[..., Option] + + ignore_requires_python = partial( + Option, +diff --git a/src/pip/_internal/commands/download.py b/src/pip/_internal/commands/download.py +index a2d3bf7d9b..7405870aef 100644 +--- a/src/pip/_internal/commands/download.py ++++ b/src/pip/_internal/commands/download.py +@@ -43,6 +43,7 @@ def add_options(self): + # type: () -> None + self.cmd_opts.add_option(cmdoptions.constraints()) + self.cmd_opts.add_option(cmdoptions.requirements()) ++ self.cmd_opts.add_option(cmdoptions.build_dir()) + self.cmd_opts.add_option(cmdoptions.no_deps()) + self.cmd_opts.add_option(cmdoptions.global_options()) + self.cmd_opts.add_option(cmdoptions.no_binary()) +diff --git a/src/pip/_internal/commands/install.py b/src/pip/_internal/commands/install.py +index 38f9f063de..a4e10f260a 100644 +--- a/src/pip/_internal/commands/install.py ++++ b/src/pip/_internal/commands/install.py +@@ -129,6 +129,8 @@ def add_options(self): + help="Installation prefix where lib, bin and other top-level " + "folders are placed") + ++ self.cmd_opts.add_option(cmdoptions.build_dir()) ++ + self.cmd_opts.add_option(cmdoptions.src()) + + self.cmd_opts.add_option( +diff --git a/src/pip/_internal/commands/wheel.py b/src/pip/_internal/commands/wheel.py +index 2d654338d7..39fd2bf812 100644 +--- a/src/pip/_internal/commands/wheel.py ++++ b/src/pip/_internal/commands/wheel.py +@@ -78,6 +78,7 @@ def add_options(self): + self.cmd_opts.add_option(cmdoptions.src()) + self.cmd_opts.add_option(cmdoptions.ignore_requires_python()) + self.cmd_opts.add_option(cmdoptions.no_deps()) ++ self.cmd_opts.add_option(cmdoptions.build_dir()) + self.cmd_opts.add_option(cmdoptions.progress_bar()) + + self.cmd_opts.add_option( diff --git a/python-pip.spec b/python-pip.spec index 3d035b59a33f24b5c58f6925acf4d9cb6a79f840..af7904b12f11b12399ef76cec4fbb929aec7e0c7 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: 30eeb9ceb10bf76316f091e8615a9c3d8025fff0.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 +* 20201202085849753896 patch-tracking 20.2.2-4 +- append patch file of upstream repository from <30eeb9ceb10bf76316f091e8615a9c3d8025fff0> to <30eeb9ceb10bf76316f091e8615a9c3d8025fff0> + * 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