mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-09 08:08:32 +00:00
Adapt crewai tool install <tool> to uv (#1481)
This commit updates the tool install comamnd to uv's new custom index feature. Related: https://github.com/astral-sh/uv/pull/7746/
This commit is contained in:
@@ -28,8 +28,6 @@ class ToolCommand(BaseCommand, PlusAPIMixin):
|
||||
A class to handle tool repository related operations for CrewAI projects.
|
||||
"""
|
||||
|
||||
BASE_URL = "https://app.crewai.com/pypi/"
|
||||
|
||||
def __init__(self):
|
||||
BaseCommand.__init__(self)
|
||||
PlusAPIMixin.__init__(self, telemetry=self._telemetry)
|
||||
@@ -178,12 +176,14 @@ class ToolCommand(BaseCommand, PlusAPIMixin):
|
||||
def _add_package(self, tool_details):
|
||||
tool_handle = tool_details["handle"]
|
||||
repository_handle = tool_details["repository"]["handle"]
|
||||
repository_url = tool_details["repository"]["url"]
|
||||
index = f"{repository_handle}={repository_url}"
|
||||
|
||||
add_package_command = [
|
||||
"uv",
|
||||
"add",
|
||||
"--extra-index-url",
|
||||
self.BASE_URL + repository_handle,
|
||||
"--index",
|
||||
index,
|
||||
tool_handle,
|
||||
]
|
||||
add_package_result = subprocess.run(
|
||||
|
||||
Reference in New Issue
Block a user