diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..7404454 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,72 @@ +name: CI + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.12"] + install-method: ["uv", "uvx"] + + steps: + - uses: actions/checkout@v4 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + + - name: Install uv + run: | + curl -LsSf https://astral.sh/uv/install.sh | sh + echo "$HOME/.cargo/bin" >> $GITHUB_PATH + + - name: Install dependencies with uv + if: matrix.install-method == 'uv' + run: | + uv venv + source .venv/bin/activate + uv pip install -e ".[dev]" + + - name: Install globally with uvx + if: matrix.install-method == 'uvx' + run: | + uvx install -e ".[dev]" + + - name: Run checks and tests + run: | + ruff check . + ruff format . --check + mypy src/mcp_server_make + pytest tests + env: + PYTHONPATH: ${{ github.workspace }}/src + + verify-uvx: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Set up Python 3.12 + uses: actions/setup-python@v5 + with: + python-version: "3.12" + + - name: Build package + run: | + curl -LsSf https://astral.sh/uv/install.sh | sh + echo "$HOME/.cargo/bin" >> $GITHUB_PATH + uv pip install build + python -m build + + - name: Test uvx installation + run: | + uvx install dist/*.whl + # Verify the tool runs + mcp-server-make --help \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..04bf5fc --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,39 @@ +name: Release + +on: + release: + types: [published] + +permissions: + contents: read + id-token: write + +jobs: + release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.12" + + - name: Install uv + run: | + curl -LsSf https://astral.sh/uv/install.sh | sh + echo "$HOME/.cargo/bin" >> $GITHUB_PATH + + - name: Install build dependencies + run: uv pip install build twine + + - name: Build package + run: python -m build + + - name: Test wheel with uvx + run: | + uvx install dist/*.whl + mcp-server-make --help + + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/pyproject.toml b/pyproject.toml index 8ef1937..689eb6f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,6 +4,20 @@ version = "0.1.0" description = "MCP Server for GNU Make" readme = "README.md" requires-python = ">=3.12" +license = "MIT" +keywords = ["mcp", "make", "build", "llm", "claude"] +classifiers = [ + "Development Status :: 4 - Beta", + "Environment :: Console", + "Intended Audience :: Developers", + "License :: OSI Approved :: MIT License", + "Operating System :: OS Independent", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3.12", + "Topic :: Software Development :: Build Tools", + "Topic :: Software Development :: Libraries :: Python Modules", +] + dependencies = [ "mcp>=1.1.2", "pydantic>=2.10.0", @@ -13,6 +27,12 @@ dependencies = [ name = "Joshua M. Dotson" email = "contact@jmdots.com" +[project.urls] +Homepage = "https://github.com/modelcontextprotocol/mcp-server-make" +Documentation = "https://github.com/modelcontextprotocol/mcp-server-make#readme" +Repository = "https://github.com/modelcontextprotocol/mcp-server-make.git" +Changelog = "https://github.com/modelcontextprotocol/mcp-server-make/blob/main/CHANGELOG.md" + [project.scripts] mcp-server-make = "mcp_server_make:main" @@ -20,6 +40,16 @@ mcp-server-make = "mcp_server_make:main" requires = ["hatchling"] build-backend = "hatchling.build" +[tool.hatch.build] +include = [ + "src/**/*.py", + "README.md", + "LICENSE", +] + +[tool.hatch.build.targets.wheel] +packages = ["src/mcp_server_make"] + [project.optional-dependencies] dev = [ "ruff>=0.1.13", @@ -27,4 +57,4 @@ dev = [ "pytest>=7.4.4", "pytest-cov>=4.1.0", "pytest-asyncio>=0.23.3", -] \ No newline at end of file +] diff --git a/src/mcp_server_make/__init__.py b/src/mcp_server_make/__init__.py index 02f037a..1023ef1 100644 --- a/src/mcp_server_make/__init__.py +++ b/src/mcp_server_make/__init__.py @@ -1,11 +1,18 @@ """MCP Server for GNU Make.""" +import asyncio + from . import exceptions from . import make from . import security from . import execution from . import handlers -from .server import main +from .server import main as async_main __version__ = "0.1.0" __all__ = ["main", "exceptions", "make", "security", "execution", "handlers"] + + +def main(): + """CLI entrypoint that runs the async main function.""" + asyncio.run(async_main())