# error: 'name' must be provided in pyproject.toml or setup.py, but both were found with different values

- **ID:** `python/setuptools-pyproject-and-setup-conflict`
- **Domain:** python
- **Category:** config_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## 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.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 3.8 | active | — | — |
| 3.9 | active | — | — |
| 3.10 | active | — | — |
| 3.11 | active | — | — |
| 3.12 | active | — | — |

## Workarounds

1. **** (95% success)
   ```
   from setuptools import setup; setup()  # metadata in pyproject.toml
   ```
2. **** (90% success)
   ```
   [project]\ndynamic = ["version"]\n[tool.setuptools.dynamic]\nversion = {attr = "mypkg.__version__"}
   ```

## Dead Ends

- **** — Build isolation does not resolve metadata conflicts. (90% fail)
- **** — If setup.py contains custom commands or dynamic fields, deleting it breaks the build. (50% fail)
