Skip to content

[BUG] grayskull seems to unnecessarily query setup.cfg / setup.py for non-setuptools build backends #635

@mgorny

Description

@mgorny

Describe the bug
According to the output, grayskull seems to be trying to find setup.cfg and setup.py files even when pyproject.toml specifies a completely different build backend. That seems unnecessary at best, and with potential to catch stale metadata at worst.

To Reproduce
grayskull gpep517

Expected behavior
grayskull noticing that the package specifies build-backend = "flit_core.buildapi" and ignoring setuptools files.

Outputs

Checking for pyproject.toml
pyproject.toml found in /tmp/grayskull-gpep517-kg7ky6od/gpep517-19/pyproject.toml
Recovering information from setup.py
Executing injected distutils...
Recovering metadata from setup.cfg
No data was recovered from setup.py. Forcing to execute the setup.py as script
Recovering metadata from setup.cfg

Environment:
pip list:

Package                Version
---------------------- -------------------------------
beautifulsoup4         4.14.3
certifi                2026.1.4
charset-normalizer     3.4.4
colorama               0.4.6
conda-souschef         2.2.3
coverage               7.13.1
execnet                2.1.2
grayskull              2.9.3.dev2+gf8a48b931.d20260113
idna                   3.11
iniconfig              2.3.0
mock                   5.2.0
numpy                  2.4.1
packaging              25.0
pip                    25.3
pkginfo                1.12.1.2
pluggy                 1.6.0
progressbar2           4.5.0
Pygments               2.19.2
pytest                 9.0.2
pytest-console-scripts 1.4.1
pytest-cov             7.0.0
pytest-mock            3.15.1
pytest-xdist           3.8.0
python-utils           3.9.1
RapidFuzz              3.14.3
requests               2.32.5
ruamel.yaml            0.19.1
ruamel.yaml.jinja2     0.2.7
setuptools             80.9.0
setuptools-scm         9.2.2
soupsieve              2.8.1
stdlib-list            0.12.0
tomli_w                1.2.0
typing_extensions      4.15.0
urllib3                2.6.3

Additional context
n/a

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions