Skip to content

Handle cases with pyproject.toml but no setup.py #279

@jfhbrook

Description

@jfhbrook

I've been kicking the tires on COPR's automatic pypi feature, which uses this project to generate spec files. When trying it out with mdformat I get this error:

Running: which pyp2rpm

cmd: ['which', 'pyp2rpm']
cwd: .
rc: 0
stdout: /usr/bin/pyp2rpm
stderr: 

Running: pyp2rpm mdformat -t fedora --srpm -d /var/lib/copr-rpmbuild/results -b 3

cmd: ['pyp2rpm', 'mdformat', '-t', 'fedora', '--srpm', '-d', '/var/lib/copr-rpmbuild/results', '-b', '3']
cwd: .
rc: 3
stdout: INFO  Pyp2rpm initialized.
INFO  Using /var/lib/copr-rpmbuild/results as directory to save source.
INFO  Downloaded package from PyPI: /var/lib/copr-rpmbuild/results/mdformat-0.7.11.tar.gz.
INFO  Getting metadata from setup.py using SetupPyMetadataExtractor.
stderr: setup.py not found, maybe /var/lib/copr-rpmbuild/results/mdformat-0.7.11.tar.gz is not proper source archive.

Copr build error: setup.py not found, maybe /var/lib/copr-rpmbuild/results/mdformat-0.7.11.tar.gz is not proper source archive.

I believe the issue is that somewhere around PEP 621 it became plausible for a package to have a pyproject.toml but not a setup.py. This is certainly the case with mdformat.

This may be a bigger issue - support pyproject.toml at all - but sticking to the scope of the bug report for now.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions