MCPcopy Create free account
hub / github.com/crewAIInc/crewAI / get_packages

Function get_packages

lib/devtools/src/crewai_devtools/cli.py:693–715  ·  view source on GitHub ↗

Get all packages from lib/ directory. Args: lib_dir: Path to lib/ directory. Returns: List of package directory paths. Raises: SystemExit: If lib/ doesn't exist or no packages found.

(lib_dir: Path)

Source from the content-addressed store, hash-verified

691
692
693def get_packages(lib_dir: Path) -> list[Path]:
694 """Get all packages from lib/ directory.
695
696 Args:
697 lib_dir: Path to lib/ directory.
698
699 Returns:
700 List of package directory paths.
701
702 Raises:
703 SystemExit: If lib/ doesn't exist or no packages found.
704 """
705 if not lib_dir.exists():
706 console.print("[red]Error:[/red] lib/ directory not found")
707 sys.exit(1)
708
709 packages = [p for p in lib_dir.iterdir() if p.is_dir()]
710
711 if not packages:
712 console.print("[red]Error:[/red] No packages found in lib/")
713 sys.exit(1)
714
715 return packages
716
717
718PrereleaseIndicator = Literal["a", "b", "rc", "alpha", "beta", "dev"]

Callers 3

bumpFunction · 0.85
tagFunction · 0.85
releaseFunction · 0.85

Calls 1

printMethod · 0.45

Tested by

no test coverage detected