diff --git a/news/2952.bugfix b/news/2952.bugfix new file mode 100644 index 00000000..df640991 --- /dev/null +++ b/news/2952.bugfix @@ -0,0 +1 @@ +Fixed a bug with importing local vendored dependencies when running ``pipenv graph``. diff --git a/pipenv/vendor/pipdeptree.py b/pipenv/vendor/pipdeptree.py index 9cce0325..2082fc8a 100644 --- a/pipenv/vendor/pipdeptree.py +++ b/pipenv/vendor/pipdeptree.py @@ -13,6 +13,8 @@ try: except ImportError: from ordereddict import OrderedDict +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 import pkg_resources diff --git a/tasks/vendoring/patches/vendor/pipdeptree-updated-pip18.patch b/tasks/vendoring/patches/vendor/pipdeptree-updated-pip18.patch index e3ff9bbf..d479ebfa 100644 --- a/tasks/vendoring/patches/vendor/pipdeptree-updated-pip18.patch +++ b/tasks/vendoring/patches/vendor/pipdeptree-updated-pip18.patch @@ -1,8 +1,8 @@ diff --git a/pipenv/vendor/pipdeptree.py b/pipenv/vendor/pipdeptree.py -index 7820aa5..9cce032 100644 +index 7820aa5..2082fc8 100644 --- a/pipenv/vendor/pipdeptree.py +++ b/pipenv/vendor/pipdeptree.py -@@ -13,11 +13,7 @@ try: +@@ -13,11 +13,9 @@ try: except ImportError: from ordereddict import OrderedDict @@ -11,6 +11,8 @@ index 7820aa5..9cce032 100644 - from pipenv.patched.notpip._internal.operations.freeze import FrozenRequirement -except ImportError: - 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 import pkg_resources