Skip to content

Commit d11e2a7

Browse files
committed
chore: Fix uv build for cdk synth
1 parent 1f3e265 commit d11e2a7

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

examples/servers/time/cdk_stack.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
import os
1515

1616

17+
# For testing, the mcp-server-in-aws-lambda module is built and bundled
18+
# from local files. Remove these command hooks if using the
19+
# mcp-server-in-aws-lambda from PyPi.
1720
@jsii.implements(lambda_python.ICommandHooks)
1821
class CommandHooks:
1922
@jsii.member(jsii_name="afterBundling")
@@ -22,6 +25,7 @@ def after_bundling(self, input_dir: str, output_dir: str) -> list[str]:
2225
f"cd {output_dir}",
2326
f"curl -LsSf https://astral.sh/uv/install.sh | env UV_UNMANAGED_INSTALL='{output_dir}' sh",
2427
f"mkdir {output_dir}/mcp_lambda_build",
28+
f"cp /mcp_lambda_src/README.md {output_dir}/mcp_lambda_build/README.md",
2529
f"cp /mcp_lambda_src/pyproject.toml {output_dir}/mcp_lambda_build/pyproject.toml",
2630
f"cp /mcp_lambda_src/uv.lock {output_dir}/mcp_lambda_build/uv.lock",
2731
f"cp -r /mcp_lambda_src/src {output_dir}/mcp_lambda_build/src",
@@ -61,7 +65,9 @@ def __init__(
6165
environment={
6266
"LOG_LEVEL": "DEBUG",
6367
},
64-
# Workaround to install the local module during packaging for testing
68+
# For testing, the mcp-server-in-aws-lambda module is built and bundled
69+
# from local files. Remove the bundling configuration if using the
70+
# mcp-server-in-aws-lambda from PyPi.
6571
bundling=lambda_python.BundlingOptions(
6672
# asset_excludes=[".venv", ".mypy_cache", "__pycache__"],
6773
volumes=[

0 commit comments

Comments
 (0)