How to use the pipx.util.get_script_output function in pipx

To help you get started, we’ve selected a few pipx examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pipxproject / pipx / src / pipx / venv.py View on Github external
def get_venv_metadata_for_package(self, package: str) -> VenvMetadata:
        data = json.loads(
            get_script_output(
                self.python_path, VENV_METADATA_INSPECTOR, package, str(self.bin_path)
            )
        )
        app_paths = [Path(p) for p in data["app_paths"]]
        if WINDOWS:
            windows_bin_paths = set()
            for app in app_paths:
                # windows has additional files staring with the same name that are required
                # to run the app
                for win_exec in app.parent.glob(f"{app.name}*.exe"):
                    windows_bin_paths.add(win_exec)
            data["app_paths"] = list(windows_bin_paths)
        else:
            data["app_paths"] = app_paths

        data["apps_of_dependencies"] = []