Skip to content

Commit

Permalink
Add new paths to front of PATH
Browse files Browse the repository at this point in the history
  • Loading branch information
sanders41 committed Nov 2, 2024
1 parent 5a51979 commit 95028e0
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions pipenv/vendor/pipdeptree/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,20 @@
from typing import Sequence

pardir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# for finding pipdeptree itself
sys.path.append(pardir)
# for finding stuff in vendor and patched
sys.path.append(os.path.dirname(os.path.dirname(pardir)))
# for finding pipdeptree itself, vendor, and patched
sys.path = [pardir, os.path.dirname(os.path.dirname(pardir))] + sys.path

from pipenv.vendor.pipdeptree._cli import get_options
from pipenv.vendor.pipdeptree._detect_env import detect_active_interpreter
from pipenv.vendor.pipdeptree._discovery import get_installed_distributions
from pipenv.vendor.pipdeptree._models import PackageDAG
from pipenv.vendor.pipdeptree._render import render
from pipenv.vendor.pipdeptree._validate import validate
from pipenv.vendor.pipdeptree._warning import WarningPrinter, WarningType, get_warning_printer
from pipenv.vendor.pipdeptree._warning import (
WarningPrinter,
WarningType,
get_warning_printer,
)


def main(args: Sequence[str] | None = None) -> None | int:
Expand All @@ -38,7 +40,9 @@ def main(args: Sequence[str] | None = None) -> None | int:
print(f"(resolved python: {resolved_path})", file=sys.stderr) # noqa: T201

pkgs = get_installed_distributions(
interpreter=options.python, local_only=options.local_only, user_only=options.user_only
interpreter=options.python,
local_only=options.local_only,
user_only=options.user_only,
)
tree = PackageDAG.from_pkgs(pkgs)

Expand Down

0 comments on commit 95028e0

Please sign in to comment.