python-pip/allow-stripping-given-prefix-from-wheel-RECORD-files.patch
2020-08-25 11:47:20 +08:00

32 lines
1.1 KiB
Diff

From e2126b5d4efdbddb15a3c354110055f40d78f4cc Mon Sep 17 00:00:00 2001
From: wwx930846 <wuchaochao4@huawei.com>
Date: Mon, 24 Aug 2020 22:01:50 +0800
Subject: [PATCH] allow-stripping-given-prefix-from-wheel-RECORD-files
---
src/pip/_internal/commands/install.py | 8 ++++++++
src/pip/_internal/req/req_install.py | 4 +++-
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/src/pip/_internal/commands/install.py b/src/pip/_internal/commands/install.py
index 8c2c32f..674d30c 100644
--- a/src/pip/_internal/commands/install.py
+++ b/src/pip/_internal/commands/install.py
@@ -130,6 +130,13 @@ class InstallCommand(RequirementCommand):
default=None,
help="Installation prefix where lib, bin and other top-level "
"folders are placed")
+ self.cmd_opts.add_option(
+ '--strip-file-prefix',
+ dest='strip_file_prefix',
+ metavar='prefix',
+ default=None,
+ help="Strip given prefix from script paths in wheel RECORD."
+ )
self.cmd_opts.add_option(cmdoptions.build_dir())
2.23.0