diff --git a/lib/cli/src/crewai_cli/create_json_crew.py b/lib/cli/src/crewai_cli/create_json_crew.py index cf84a7f1b..0e052ce9b 100644 --- a/lib/cli/src/crewai_cli/create_json_crew.py +++ b/lib/cli/src/crewai_cli/create_json_crew.py @@ -96,6 +96,9 @@ dependencies = [ requires = ["hatchling"] build-backend = "hatchling.build" +[tool.hatch.build.targets.wheel] +only-include = ["agents", "crew.jsonc", "tools", "knowledge", "skills"] + [tool.crewai] type = "crew" """ diff --git a/lib/cli/tests/test_create_crew.py b/lib/cli/tests/test_create_crew.py index bb4bc68be..44ac62558 100644 --- a/lib/cli/tests/test_create_crew.py +++ b/lib/cli/tests/test_create_crew.py @@ -5,6 +5,7 @@ from pathlib import Path from unittest import mock import pytest +import tomli from click.testing import CliRunner import crewai_cli.create_json_crew as json_crew import crewai_cli.tui_picker as tui_picker @@ -712,6 +713,11 @@ def test_json_create_provider_preselects_default_model(tmp_path, monkeypatch): assert not (tmp_path / "json_crew" / "tests").exists() assert not (tmp_path / "json_crew" / "config.jsonc").exists() + pyproject = tomli.loads((tmp_path / "json_crew" / "pyproject.toml").read_text()) + assert pyproject["tool"]["hatch"]["build"]["targets"]["wheel"][ + "only-include" + ] == ["agents", "crew.jsonc", "tools", "knowledge", "skills"] + crew_template = (tmp_path / "json_crew" / "crew.jsonc").read_text() assert ( '"guardrail": "Every factual claim needs context support."'