From 96c9bad51ab92dcf6512d74ad554d9006ac97377 Mon Sep 17 00:00:00 2001 From: zzstoatzz Date: Fri, 11 Apr 2025 03:36:00 -0500 Subject: [PATCH] push code --- examples/smart_home/pyproject.toml | 13 +++++-------- examples/smart_home/src/smart_home/hub.py | 4 +++- examples/smart_home/src/smart_home/lights/server.py | 4 +++- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/examples/smart_home/pyproject.toml b/examples/smart_home/pyproject.toml index 4b21c0107..367bd8da0 100644 --- a/examples/smart_home/pyproject.toml +++ b/examples/smart_home/pyproject.toml @@ -5,21 +5,18 @@ description = "Add your description here" readme = "README.md" authors = [{ name = "zzstoatzz", email = "thrast36@gmail.com" }] requires-python = ">=3.12" -dependencies = ["fastmcp"] +dependencies = [ + "fastmcp@git+https://github.com/jlowin/fastmcp.git@2.x", + "phue2", +] [project.scripts] smart-home = "smart_home.__main__:main" [dependency-groups] -dev = ["ruff", "smart_home[lights]"] - -[project.optional-dependencies] -lights = ["phue2"] +dev = ["ruff"] [build-system] requires = ["uv_build"] build-backend = "uv_build" - -[tool.uv.sources] -fastmcp = { path = "../../" } diff --git a/examples/smart_home/src/smart_home/hub.py b/examples/smart_home/src/smart_home/hub.py index eda88bdc2..ac011c3c1 100644 --- a/examples/smart_home/src/smart_home/hub.py +++ b/examples/smart_home/src/smart_home/hub.py @@ -3,7 +3,9 @@ from smart_home.lights.server import bridge, lights_mcp hub_mcp = FastMCP( "Smart Home Hub (phue2)", - dependencies=["fastmcp@git+https://github.com/jlowin/fastmcp.git", "phue2"], + dependencies=[ + "smart_home@git+https://github.com/jlowin/fastmcp.git@n8example#subdirectory=examples/smart_home", + ], ) # Mount the lights service under the 'hue' prefix diff --git a/examples/smart_home/src/smart_home/lights/server.py b/examples/smart_home/src/smart_home/lights/server.py index 47ac5aed2..9bf976fe8 100644 --- a/examples/smart_home/src/smart_home/lights/server.py +++ b/examples/smart_home/src/smart_home/lights/server.py @@ -44,7 +44,9 @@ except Exception as e: lights_mcp = FastMCP( "Hue Lights Service (phue2)", - dependencies=["phue2", "fastmcp@git+https://github.com/jlowin/fastmcp.git"], + dependencies=[ + "smart_home@git+https://github.com/jlowin/fastmcp.git@n8example#subdirectory=examples/smart_home", + ], ) # --- Resources ---