From 70a1684b6f10c8841802e17e176f7978a526b780 Mon Sep 17 00:00:00 2001 From: scott------ Date: Tue, 18 Mar 2025 14:01:17 -0400 Subject: [PATCH] fix: update pyproject.toml to resolve packaging error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The installation was failing due to setuptools discovering multiple top-level modules in the flat project layout. This commit updates the pyproject.toml by explicitly specifying: • The standalone modules ("config.py", "server.py", "unity_connection.py") via the py-modules field. • The "tools" directory as a package via the packages field. These changes resolve the "multiple top-level modules discovered" error encountered during `uv pip install -e .` and ensure a clean, predictable package build. --- Python/pyproject.toml | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/Python/pyproject.toml b/Python/pyproject.toml index 0c59694d..17987d7d 100644 --- a/Python/pyproject.toml +++ b/Python/pyproject.toml @@ -1,10 +1,21 @@ [project] -name = "unity" +name = "unity-mcp" version = "0.1.0" -description = "Add your description here" +description = "Unity MCP Server: A Unity package for Unity Editor integration via the Model Context Protocol (MCP)." readme = "README.md" requires-python = ">=3.12" dependencies = [ - "httpx>=0.28.1", - "mcp[cli]>=1.4.1", + "httpx>=0.28.1", + "mcp[cli]>=1.4.1" ] + +[build-system] +requires = ["setuptools>=42", "wheel"] +build-backend = "setuptools.build_meta" + +[tool.setuptools] +# These are the single-file modules at the root of the Python folder. +py-modules = ["config", "server", "unity_connection"] + +# The "tools" subdirectory is a package. +packages = ["tools"]