{
  "id": "python/setuptools-pyproject-and-setup-conflict",
  "signature": "error: 'name' must be provided in pyproject.toml or setup.py, but both were found with different values",
  "signature_zh": "错误：'name' 必须在 pyproject.toml 或 setup.py 中提供，但两者都存在且值不同",
  "regex": "error:\\ 'name'\\ must\\ be\\ provided\\ in\\ pyproject\\.toml\\ or\\ setup\\.py,\\ but\\ both\\ were\\ found\\ with\\ different\\ values",
  "domain": "python",
  "category": "config_error",
  "subcategory": null,
  "root_cause": "The project has both pyproject.toml [project] and setup.py with conflicting metadata. setuptools does not merge them; the TOML takes precedence but inconsistency triggers errors.",
  "root_cause_type": "generic",
  "root_cause_zh": "项目同时包含 pyproject.toml [project] 和 setup.py，且元数据冲突。setuptools 不会合并它们；TOML 优先，但不一致会触发错误。",
  "versions": [
    {
      "version": "3.8",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "3.9",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "3.10",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "3.11",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "3.12",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Build isolation does not resolve metadata conflicts.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "If setup.py contains custom commands or dynamic fields, deleting it breaks the build.",
      "fail_rate": 0.5,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.95,
      "how": "from setuptools import setup; setup()  # metadata in pyproject.toml",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.9,
      "how": "[project]\\ndynamic = [\"version\"]\\n[tool.setuptools.dynamic]\\nversion = {attr = \"mypkg.__version__\"}",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": null,
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.87,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-08-22",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}