# error: Multiple top-level packages discovered in a flat-layout: ['package1', 'package2'].

- **ID:** `python/setuptools-long-description-error`
- **Domain:** python
- **Category:** config_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

setuptools automatically discovers packages but finds multiple in the same directory, causing ambiguity.

## Version Compatibility

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

## Workarounds

1. **Explicitly specify packages in setup.py or setup.cfg** (90% success)
   ```
   In setup.cfg, add '[options]\npackages = find:' and configure find options, or list packages manually.
   ```
2. **Use a src-layout** (85% success)
   ```
   Move packages into a 'src/' directory and set 'package_dir = {"": "src"}' in setup.cfg.
   ```

## Dead Ends

- **Ignoring the warning and proceeding** — setuptools may fail to build or include wrong packages. (80% fail)
- **Renaming the packages to have a common prefix** — This does not resolve the flat-layout detection logic. (60% fail)
