Description of problem: gelidum v0.9.1 has no setup.py and no section about the build system, but pip (25.2 from rawhide) succeeds with installation. To quote the source code: # If setup.py is also not present program will mimick pip's behavior # and end with an error. But pip succeeds, and /usr/lib/rpm/redhat/pyproject_buildrequires.py fails with a FileNotFoundError. Version-Release number of selected component (if applicable): pyproject-rpm-macros-1.18.4-1.fc44.noarch How reproducible: always Steps to Reproduce: 1. fedpkg clone -a python-gelidum && cd python-gelidum 2. sed -e 's/0.7.0/0.9.1/' -i python-gelidum.spec 3. fedpkg local (or coprbuild / + HOSTNAME=rpmbuild Actual results: + HOSTNAME=rpmbuild + /usr/bin/python3 -Bs /usr/lib/rpm/redhat/pyproject_buildrequires.py --generate-extras --python3_pkgversion 3 --wheeldir /home/fedora/python-gelidum/python-gelidum-0.9.1-build/pyproject-wheeldir --output /home/dave/fedora-scm/python-gelidum/python-gelidum-0.9.1-build/python-gelidum-0.9.1-1.fc44.noarch-pyproject-buildrequires -r Traceback (most recent call last): File "/usr/lib/rpm/redhat/pyproject_buildrequires.py", line 730, in main generate_requires( ~~~~~~~~~~~~~~~~~^ include_runtime=args.runtime, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<11 lines>... config_settings=parse_config_settings_args(args.config_settings), ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) ^ File "/usr/lib/rpm/redhat/pyproject_buildrequires.py", line 611, in generate_requires backend = get_backend(requirements) File "/usr/lib/rpm/redhat/pyproject_buildrequires.py", line 272, in get_backend raise FileNotFoundError('File "setup.py" not found for legacy project.') FileNotFoundError: File "setup.py" not found for legacy project. error: Bad exit status from /var/tmp/rpm-tmp.E3wvA3 (%generate_buildrequires) RPM build errors: Bad exit status from /var/tmp/rpm-tmp.E3wvA3 (%generate_buildrequires) Expected results: No error Additional info: pip has no issue with this minimalism package: $ pip install --user python-gelidum-0.9.1-build/gelidum-0.9.1/ Processing ./python-gelidum-0.9.1-build/gelidum-0.9.1 Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... done Building wheels for collected packages: gelidum Building wheel for gelidum (pyproject.toml) ... done Created wheel for gelidum: filename=gelidum-0.9.1-py3-none-any.whl size=40539 sha256=c071d0f0d4fa2c69932d92281b2eeae3a5e5b37cd81e77fee244ada3b185ae5a Stored in directory: /home/fedora/.cache/pip/wheels/2f/d6/c7/2c5f6f0b3085dceb64c1f047efddd03ec8d422dd6dd94b05d6 Successfully built gelidum Installing collected packages: gelidum Attempting uninstall: gelidum Found existing installation: gelidum 0.9.1 Uninstalling gelidum-0.9.1: Successfully uninstalled gelidum-0.9.1 Successfully installed gelidum-0.9.1
[python-gelidum (rawhide)]$ sed -e 's/0.7.0/0.9.1/' -i python-gelidum.spec [python-gelidum (rawhide *)]$ spectool -g python-gelidum.spec Downloading: https://github.com/diegojromerolopez/gelidum/archive/v0.9.1/gelidum-0.9.1.tar.gz | 126.5 KiB Elapsed Time: 0:00:00 Downloaded: gelidum-0.9.1.tar.gz [python-gelidum (rawhide *)]$ fedpkg --release rawhide prep ... [python-gelidum (rawhide *)]$ ls python-gelidum-0.9.1-build/gelidum-0.9.1/pyproject.toml python-gelidum-0.9.1-build/gelidum-0.9.1/pyproject.toml [python-gelidum (rawhide *)]$ cat python-gelidum-0.9.1-build/gelidum-0.9.1/pyproject.toml [project] name = "gelidum" version = "0.9.1" description = "Freeze your objects in python" readme = "README.md" keywords = [ "freeze", "python", "object" ] requires-python = ">=3.7" authors = [ { name = "Diego J. Romero López", email = "diegojromerolopez" }, ] classifiers=[ "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Topic :: Software Development :: Libraries", "Development Status :: 4 - Beta", "License :: OSI Approved :: MIT License" ] dependencies = [] [project.urls] repository = "https://github.com/diegojromerolopez/gelidum" documentation = "https://github.com/diegojromerolopez/gelidum/blob/main/README.md" "Bug Tracker" = "https://github.com/diegojromerolopez/gelidum/issues" [dependency-groups] dev = [ "black>=25.1.0", "coverage>=7.9.2", "flake8>=7.3.0", "flake8-quotes>=3.4.0", "isort>=6.0.1", ] [tool.setuptools.packages.find] include = ["gelidum*"] exclude = ["resources*"] [tool.black] line-length = 120 target-version = ['py39'] skip_string_normalization = true [tool.flake8] inline-quotes = "'" multiline-quotes = "'''" docstring-quotes = '"""' [tool.isort] profile = "black" ============= I think the problem is there is no [build-system] section in pyproject.toml. https://peps.python.org/pep-0518/ says: > If the file exists but is lacking the [build-system] table, then the default values as specified above should be used. Our implementation looks for setup.py file in that case, and probably shouldn't.
This behavior was introduced in https://src.fedoraproject.org/rpms/pyproject-rpm-macros/c/5b1caad68ea1d5efa9088f13e535c00aa1b8aafc as a fix of bz1976459, which contradicts this bugzilla. pip removed that check later in https://github.com/pypa/pip/pull/10577 and replaced it with a check for the presence of either files, but not the section.
See also https://discuss.python.org/t/do-we-want-to-keep-the-build-system-default-for-pyproject-toml/104759/22 where this is discussed.
Any updates on this? I would like to update gelidum, but am not sure whether I need to change gelidum or whether this will be fixed. There was nothing posted in the discussion since November, so where does this leaves us? Change geldium?
Ideally, add [build-system] section to pyproject.toml. Is that possible?
I have added a patched, and am proposing it upstream: https://github.com/diegojromerolopez/gelidum/pull/51