diff --git a/pipenv/__init__.py b/pipenv/__init__.py index 2bd2a28c..240e089e 100644 --- a/pipenv/__init__.py +++ b/pipenv/__init__.py @@ -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. diff --git a/pipenv/environments.py b/pipenv/environments.py index 1471e450..46d9ff5c 100644 --- a/pipenv/environments.py +++ b/pipenv/environments.py @@ -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) diff --git a/pipenv/vendor/pipdeptree.py b/pipenv/vendor/pipdeptree.py index 9f692879..e939db37 100644 --- a/pipenv/vendor/pipdeptree.py +++ b/pipenv/vendor/pipdeptree.py @@ -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: diff --git a/tasks/vendoring/patches/vendor/pipdeptree-update-pip-import.patch b/tasks/vendoring/patches/vendor/pipdeptree-update-pip-import.patch index c72f8d31..810d674f 100644 --- a/tasks/vendoring/patches/vendor/pipdeptree-update-pip-import.patch +++ b/tasks/vendoring/patches/vendor/pipdeptree-update-pip-import.patch @@ -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