Fix pip shims import

This commit is contained in:
Frost Ming
2021-11-04 17:36:23 +08:00
parent 0b6de55d5d
commit 10554c1c7d
4 changed files with 4 additions and 5 deletions
+2 -1
View File
@@ -25,7 +25,8 @@ warnings.filterwarnings("ignore", category=DependencyWarning)
warnings.filterwarnings("ignore", category=ResourceWarning)
warnings.filterwarnings("ignore", category=UserWarning)
# Load patched pip instead of system pip
os.environ["PIP_SHIMS_BASE_MODULE"] = fs_str("pipenv.patched.notpip")
os.environ["PIP_DISABLE_PIP_VERSION_CHECK"] = fs_str("1")
# Hack to make things work better.
-2
View File
@@ -97,8 +97,6 @@ def normalize_pipfile_path(p):
# HACK: Prevent invalid shebangs with Homebrew-installed Python:
# https://bugs.python.org/issue22490
os.environ.pop("__PYVENV_LAUNCHER__", None)
# Load patched pip instead of system pip
os.environ["PIP_SHIMS_BASE_MODULE"] = fs_str("pipenv.patched.notpip")
# Internal, to tell whether the command line session is interactive.
SESSION_IS_INTERACTIVE = _isatty(sys.stdout)
PIPENV_IS_CI = bool("CI" in os.environ or "TF_BUILD" in os.environ)
+1 -1
View File
@@ -23,7 +23,7 @@ except ImportError:
pardir = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
sys.path.append(pardir)
from pipenv.vendor.pip_shims import get_installed_distributions, FrozenRequirement
from pipenv.vendor.pip_shims.shims import get_installed_distributions, FrozenRequirement
import pkg_resources
# inline:
@@ -13,7 +13,7 @@ index e15cd8f4..9f692879 100644
- from pipenv.patched.notpip import get_installed_distributions, FrozenRequirement
+pardir = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+sys.path.append(pardir)
+from pipenv.vendor.pip_shims import get_installed_distributions, FrozenRequirement
+from pipenv.vendor.pip_shims.shims import get_installed_distributions, FrozenRequirement
-from pipenv.patched.notpip._vendor import pkg_resources
+import pkg_resources