Problem
The repo uses setup.py instead of pyproject.toml. This is the legacy packaging format. More importantly, all dependencies (SDK, CLI, MCP) are bundled in a single install_requires — consumers who only need the SDK (e.g., to import gwsa.sdk.mail from another package) are forced to pull in Click, FastMCP, and other interface-layer dependencies they don't use.
Proposed solution
Migrate from setup.py to pyproject.toml with optional extras:
[project]
name = "gwsa"
dependencies = [
# SDK-only dependencies
"google-auth",
"google-auth-oauthlib",
"httpx",
# ... other SDK imports
]
[project.optional-dependencies]
cli = ["click>=8.0"]
mcp = ["mcp>=1.0.0"]
This enables:
# SDK only (for cross-repo import)
pip install "git+https://github.com/krisrowe/gworkspace-access.git"
# Full install
pipx install "gwsa[cli,mcp] @ git+https://github.com/krisrowe/gworkspace-access.git"
No code changes should be required — the SDK layer already doesn't import Click or FastMCP. This is purely a packaging change. Verify by checking that no __init__.py eagerly imports from cli/ or mcp/ at package load time; if so, make those imports lazy.
See krisrowe/mcp/framework/ for the pattern documentation.
Work breakdown
Problem
The repo uses
setup.pyinstead ofpyproject.toml. This is the legacy packaging format. More importantly, all dependencies (SDK, CLI, MCP) are bundled in a singleinstall_requires— consumers who only need the SDK (e.g., to importgwsa.sdk.mailfrom another package) are forced to pull in Click, FastMCP, and other interface-layer dependencies they don't use.Proposed solution
Migrate from
setup.pytopyproject.tomlwith optional extras:This enables:
No code changes should be required — the SDK layer already doesn't import Click or FastMCP. This is purely a packaging change. Verify by checking that no
__init__.pyeagerly imports fromcli/ormcp/at package load time; if so, make those imports lazy.See krisrowe/mcp/framework/ for the pattern documentation.
Work breakdown
gwsa/__init__.pyfor eager imports of cli/mcp modulesinstall_requiresand split into base vs cli vs mcppyproject.tomlwith optional extrassetup.pypip install .(SDK only) works without Click/FastMCPpip install ".[cli,mcp]"works with full functionalitygwsain optional[google]extra — no change needed)