Skip to content

error: Multiple top-level packages discovered in a flat-layout #611

@patrick-kidger

Description

@patrick-kidger

So I understand that setuptools and python setup.py sdist bdist_wheel are being deprecated in favour of pyproject.toml and using python -m build. In my project I've deleted setup.py and transitioned everything into pyproject.toml.

Now I have a few other top-level folders, so I get the titled error message when running python -m build. The guidance I find online suggests resolving this by adding a tools.setuptools.packages entry to my pyproject.toml, and indeed this works.

But, of course, I'm making this transition precisely to avoid using setuptools in the first place! I assume that adding a setuptools entry is probably not going to be compatible for very much longer.

What is the appropriate way to work around this that depends only on build, and not on setuptools?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions