src/eric7/PipInterface/Pip.py

branch
eric7
changeset 9309
60ee3f038f52
parent 9278
36448ca469c2
child 9310
8ab45a4a6d96
diff -r 110d32f96013 -r 60ee3f038f52 src/eric7/PipInterface/Pip.py
--- a/src/eric7/PipInterface/Pip.py	Fri Sep 02 16:07:11 2022 +0200
+++ b/src/eric7/PipInterface/Pip.py	Sat Sep 03 17:16:33 2022 +0200
@@ -991,13 +991,8 @@
         if envName:
             interpreter = self.getVirtualenvInterpreter(envName)
             if interpreter:
-                from . import pipdeptree
-
-                with open(pipdeptree.__file__, "r") as f:
-                    content = f.read()
                 args = [
-                    "-c",
-                    content,
+                    os.path.join(os.path.dirname(__file__), "pipdeptree.py"),
                     "--json-tree",
                 ]
                 if localPackages:
@@ -1048,13 +1043,9 @@
         if envName:
             interpreter = self.getVirtualenvInterpreter(envName)
             if interpreter:
-                from . import piplicenses
 
-                with open(piplicenses.__file__, "r") as f:
-                    content = f.read()
                 args = [
-                    "-c",
-                    content,
+                    os.path.join(os.path.dirname(__file__), "piplicenses.py"),
                     "--from",
                     "mixed",
                     "--with-system",

eric ide

mercurial