Skip to content

setup.py setup() not detected in __name__ == '__main__' block #1611

@rogerbinns

Description

@rogerbinns

Description

My setup.py setup() includes:

python_requires=">=3.8"

However cibuildwheel still tries and fails to compile under Python 3.6.

I understand there is CIBW_BUILD / CIBW_SKIP but that is then duplicating the python requires information.

I can add a [project] section to pyproject.toml but that leads to a lot of problems because it ends up fighting with setup() parameters and they really don't like it.

I believe cibuildwheel should establish the Python version support automatically whether it comes from setuptools or pyproject.toml, and not try to build on unsupported versions. My pyproject.toml is:

[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

Build log

https://github.com/rogerbinns/apsw/actions/runs/6175182758/job/16761477543

CI config

https://github.com/rogerbinns/apsw/actions/runs/6175182758/workflow

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