Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def _update_package_metadata(
self,
package: str,
package_or_url: str,
pip_args: List[str],
include_dependencies: bool,
include_apps: bool,
is_main_package: bool,
) -> None:
venv_package_metadata = self.get_venv_metadata_for_package(package)
package_info = PackageInfo(
package=package,
package_or_url=abs_path_if_local(package_or_url, self, pip_args),
pip_args=pip_args,
include_apps=include_apps,
include_dependencies=include_dependencies,
apps=venv_package_metadata.apps,
app_paths=venv_package_metadata.app_paths,
apps_of_dependencies=venv_package_metadata.apps_of_dependencies,
app_paths_of_dependencies=venv_package_metadata.app_paths_of_dependencies,
package_version=venv_package_metadata.package_version,
)
if is_main_package:
self.pipx_metadata.main_package = package_info
else:
self.pipx_metadata.injected_packages[package] = package_info