List the full name of the library dependencies.
(self)
| 35 | self.path = path |
| 36 | |
| 37 | def list_dependencies(self): |
| 38 | """ |
| 39 | List the full name of the library dependencies. |
| 40 | """ |
| 41 | system = platform.system() |
| 42 | if system == "Linux": |
| 43 | result = _ldd.run(self.path, stdout=subprocess.PIPE) |
| 44 | lines = result.stdout.splitlines() |
| 45 | return [ll.split(None, 1)[0].decode() for ll in lines] |
| 46 | elif system == "Darwin": |
| 47 | result = _otool.run("-L", self.path, stdout=subprocess.PIPE) |
| 48 | lines = result.stdout.splitlines() |
| 49 | return [dl.split(None, 1)[0].decode() for dl in lines] |
| 50 | else: |
| 51 | raise ValueError(f"{platform} is not supported") |
| 52 | |
| 53 | def list_dependency_names(self): |
| 54 | """ |
no test coverage detected