I'm packaging python-mistune as a dependency for hyperkitty (so we can finally pull off a Mailman3/Hyperkitty migration from the current RHEL7+custom repo setup - tracked in https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=2030061)
python-mistune review: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=2031262
One weird thing is, pyproject_buildrequires fails:
``` Executing(%generate_buildrequires): /bin/sh -e /var/tmp/rpm-tmp.KZ4hKk + umask 022 + cd /builddir/build/BUILD + cd mistune-2.0.0 + echo python3-devel + echo 'python3dist(pip) >= 19' + echo 'python3dist(packaging)' + '[' -f pyproject.toml ']' + echo 'python3dist(toml)' + rm -rfv '*.dist-info/' + '[' -f /usr/bin/python3 ']' + RPM_TOXENV=py310 + HOSTNAME=rpmbuild + /usr/bin/python3 -s /usr/lib/rpm/redhat/pyproject_buildrequires.py --generate-extras --python3_pkgver sion 3 Handling setuptools from build-system.requires Requirement satisfied: setuptools (installed: setuptools 58.5.3) Handling wheel from build-system.requires Requirement not satisfied: wheel Traceback (most recent call last): File "/usr/lib/rpm/redhat/pyproject_buildrequires.py", line 421, in main generate_requires( File "/usr/lib/rpm/redhat/pyproject_buildrequires.py", line 354, in generate_requires backend = get_backend(requirements) File "/usr/lib/rpm/redhat/pyproject_buildrequires.py", line 219, in get_backend raise FileNotFoundError('File "setup.py" not found for legacy project.') FileNotFoundError: File "setup.py" not found for legacy project. ```
so I had to manually add the BRs in https://salimma.fedorapeople.org/specs/python/python-mistune.spec
the `pyproject.toml` is super simple: ``` $ cat python/mistune-2.0.0/pyproject.toml [build-system] requires = [ "setuptools", "wheel" ] ```
because the project really didn't have any dependency (beyond pytest for running tests).
Is this a problem with our tooling or with upstream's pyproject.toml? Happy to follow up with them if they need a more fleshed-out project definition.
Thanks,
On 10. 12. 21 22:30, Michel Alexandre Salim wrote:
I'm packaging python-mistune as a dependency for hyperkitty (so we can finally pull off a Mailman3/Hyperkitty migration from the current RHEL7+custom repo setup - tracked in https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=2030061)
python-mistune review: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=2031262
One weird thing is, pyproject_buildrequires fails:
Executing(%generate_buildrequires): /bin/sh -e /var/tmp/rpm-tmp.KZ4hKk + umask 022 + cd /builddir/build/BUILD + cd mistune-2.0.0 + echo python3-devel + echo 'python3dist(pip) >= 19' + echo 'python3dist(packaging)' + '[' -f pyproject.toml ']' + echo 'python3dist(toml)' + rm -rfv '*.dist-info/' + '[' -f /usr/bin/python3 ']' + RPM_TOXENV=py310 + HOSTNAME=rpmbuild + /usr/bin/python3 -s /usr/lib/rpm/redhat/pyproject_buildrequires.py --generate-extras --python3_pkgver sion 3 Handling setuptools from build-system.requires Requirement satisfied: setuptools (installed: setuptools 58.5.3) Handling wheel from build-system.requires Requirement not satisfied: wheel Traceback (most recent call last): File "/usr/lib/rpm/redhat/pyproject_buildrequires.py", line 421, in main generate_requires( File "/usr/lib/rpm/redhat/pyproject_buildrequires.py", line 354, in generate_requires backend = get_backend(requirements) File "/usr/lib/rpm/redhat/pyproject_buildrequires.py", line 219, in get_backend raise FileNotFoundError('File "setup.py" not found for legacy project.') FileNotFoundError: File "setup.py" not found for legacy project.
so I had to manually add the BRs in https://salimma.fedorapeople.org/specs/python/python-mistune.spec
the `pyproject.toml` is super simple:
$ cat python/mistune-2.0.0/pyproject.toml [build-system] requires = [ "setuptools", "wheel" ]
because the project really didn't have any dependency (beyond pytest for running tests).
Is this a problem with our tooling or with upstream's pyproject.toml?
The problem is with upstream's pyproject.toml. They don't specify build backed, hence setup.py approach is used as a fallback and setup.py does not exist.
Either they need to to specify build backend to setuptools (preferred) or setup.py needs to exist in sdist.
See also https://lists.fedoraproject.org/archives/list/python-devel@lists.fedoraproje... Search for "%pyproject_buildrequires fallbacks to setuptools only if setup.py exists."
python-devel@lists.fedoraproject.org