mirror of
https://github.com/kennethreitz/pipenv.git
synced 2026-06-05 22:50:18 +00:00
Fix pip shims import
This commit is contained in:
+2
-1
@@ -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.
|
||||
|
||||
@@ -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)
|
||||
|
||||
Vendored
+1
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user