From 4091af4560b5d04aa4cd22d451fbcafc847803e7 Mon Sep 17 00:00:00 2001 From: fansir Date: Fri, 21 Mar 2025 18:44:49 +0800 Subject: [PATCH] Fix: multiple top-level packages error in Python project (#6370) ### What problem does this PR solve? This PR resolves the issue of multiple top-level packages being detected in the Python project, which caused errors when using uv pip install. The problem occurred because the project had multiple directories files at the root level, leading to a flat-layout error. To fix this, the pyproject.toml file was updated to explicitly list the packages using the [tool.setuptools] section. This ensures that the correct packages are included during installation, avoiding the flat-layout error. Type of change ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) --- pyproject.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 1d39c9b2a..ed437bcbd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -136,6 +136,9 @@ full = [ "transformers>=4.35.0,<5.0.0" ] +[tool.setuptools] +packages = ['rag', 'api', 'sdk', 'helm','agent', 'deepdoc', 'graphrag', 'flask_session', 'intergrations', 'agentic_reasoning'] + [[tool.uv.index]] url = "https://mirrors.aliyun.com/pypi/simple"