Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if package_metadata.apps:
pass
elif package_metadata.apps_of_dependencies and include_dependencies:
pass
else:
# No apps associated with this package and we aren't including dependencies.
# This package has nothing for pipx to use, so this is an error.
if venv.safe_to_remove():
venv.remove_venv()
raise PipxError(
f"No apps associated with package {package} or its dependencies."
"If you are attempting to install a library, pipx should not be used. "
"Consider using pip or a similar tool instead."
)
expose_apps_globally(
local_bin_dir, package_metadata.app_paths, package, force=force
)
if include_dependencies:
for _, app_paths in package_metadata.app_paths_of_dependencies.items():
expose_apps_globally(local_bin_dir, app_paths, package, force=force)
print(get_package_summary(venv_dir, package=package, new_install=True))
_warn_if_not_on_path(local_bin_dir)
print(f"done! {stars}", file=sys.stderr)
# This package has nothing for pipx to use, so this is an error.
if venv.safe_to_remove():
venv.remove_venv()
raise PipxError(
f"No apps associated with package {package} or its dependencies."
"If you are attempting to install a library, pipx should not be used. "
"Consider using pip or a similar tool instead."
)
expose_apps_globally(
local_bin_dir, package_metadata.app_paths, package, force=force
)
if include_dependencies:
for _, app_paths in package_metadata.app_paths_of_dependencies.items():
expose_apps_globally(local_bin_dir, app_paths, package, force=force)
print(get_package_summary(venv_dir, package=package, new_install=True))
_warn_if_not_on_path(local_bin_dir)
print(f"done! {stars}", file=sys.stderr)