Skip to content

Commit

Permalink
Fix graph import
Browse files Browse the repository at this point in the history
- Fixes #2952

Signed-off-by: Dan Ryan <dan@danryan.co>
  • Loading branch information
techalchemy committed Oct 9, 2018
1 parent b06ba8b commit be0594e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
1 change: 1 addition & 0 deletions news/2952.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed a bug with importing local vendored dependencies when running ``pipenv graph``.
2 changes: 2 additions & 0 deletions pipenv/vendor/pipdeptree.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
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
Expand Down
14 changes: 8 additions & 6 deletions tasks/vendoring/patches/vendor/pipdeptree-updated-pip18.patch
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
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

-try:
- from pipenv.patched.notpip._internal import get_installed_distributions
- from pipenv.patched.notpip._internal.operations.freeze import FrozenRequirement
- from pip._internal import get_installed_distributions
- from pip._internal.operations.freeze import FrozenRequirement
-except ImportError:
- from pipenv.patched.notpip import get_installed_distributions, FrozenRequirement
- from pip 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
# inline:
# inline:

0 comments on commit be0594e

Please sign in to comment.