src/eric7/PipInterface/Pip.py

branch
eric7
changeset 10177
27a6e35c64ed
parent 10167
0a62a4bf749c
child 10209
8bb763e85937
equal deleted inserted replaced
10176:5e26785b93b8 10177:27a6e35c64ed
1017 dependencies = [] 1017 dependencies = []
1018 1018
1019 if envName: 1019 if envName:
1020 interpreter = self.getVirtualenvInterpreter(envName) 1020 interpreter = self.getVirtualenvInterpreter(envName)
1021 if interpreter: 1021 if interpreter:
1022 args = [ 1022 args = ["-m", "pipdeptree", "--python", interpreter, "--json-tree"]
1023 os.path.join(os.path.dirname(__file__), "pipdeptree.py"),
1024 "--json-tree",
1025 ]
1026 if localPackages: 1023 if localPackages:
1027 args.append("--local-only") 1024 args.append("--local-only")
1028 if usersite: 1025 if usersite:
1029 args.append("--user-only") 1026 args.append("--user-only")
1030 if reverse: 1027 if reverse:
1031 args.append("--reverse") 1028 args.append("--reverse")
1032 1029
1033 proc = QProcess() 1030 proc = QProcess()
1034 proc.start(interpreter, args) 1031 proc.start(PythonUtilities.getPythonExecutable(), args)
1035 if proc.waitForStarted(15000) and proc.waitForFinished(30000): 1032 if proc.waitForStarted(15000) and proc.waitForFinished(30000):
1036 output = str( 1033 output = str(
1037 proc.readAllStandardOutput(), 1034 proc.readAllStandardOutput(),
1038 Preferences.getSystem("IOEncoding"), 1035 Preferences.getSystem("IOEncoding"),
1039 "replace", 1036 "replace",

eric ide

mercurial