Closed AndyMender closed 3 years ago
aargh, it probably changed recently because it definitely used to work. That's why somewhere in the setuptools docs they recommend to never drop extras_require
entries if later on an extra set of dependencies becomes required, but always keep it with an empty list value so that it still works as no-op without breaking all the clients that use the old extra..
wait -- I see toml
is still among the setuptools_scm extras_require
(this is current master):
https://github.com/pypa/setuptools_scm/blob/303defef04aa1a60dc74a4e52fef0bcf05c3d6be/setup.cfg#L42-L43
so I don't know why it isn't working for you. Are you using the latest pip and setuptools?
anyway, i think setuptools_scm[toml]
is only needed for the new PEP517 pyproject.toml setup, not for the old setup_requires
approach. So like @AndyMender suggested, the fix is to replace it with plain setuptools_scm
wait -- I see
toml
is still among the setuptools_scmextras_require
(this is current master): https://github.com/pypa/setuptools_scm/blob/303defef04aa1a60dc74a4e52fef0bcf05c3d6be/setup.cfg#L42-L43so I don't know why it isn't working for you. Are you using the latest pip and setuptools?
I'm using the following:
pip 19.3.1 from /usr/lib/python3.8/site-packages/pip (python 3.8)
setuptools 41.6.0 from /usr/lib/python3.8/site-packages/setuptools (python 3.8)
setuptools-scm 3.3.3 from /usr/lib/python3.8/site-packages/setuptools_scm (python 3.8)
The problem might actually be setuptools_scm
, however that's the latest available in Fedora 32 and that's also the version I'm using to test the RPM build process locally before pushing the updated package to Fedora.
Fedora 33 ships 4.1.2 apparently https://koji.fedoraproject.org/koji/packageinfo?packageID=21210
Fedora 33 ships 4.1.2 apparently https://koji.fedoraproject.org/koji/packageinfo?packageID=21210
And it builds cleanly in Koji: https://koji.fedoraproject.org/koji/taskinfo?taskID=56205224
I should've checked that first or in mock
, I guess. Apologies!
Since Fedora 32 is being phased out, I'll remove the patch (lines in the original message) I added to the SPEC file already and resubmit to Fedora 34/Rawhide and Fedora 33 only. Then, we can close this here ticket.
Thoughts? :)
Fedora's setuptools_scm package for 4.1.2 has a +toml sub-package: https://koji.fedoraproject.org/koji/rpminfo?rpmID=22407617 . Maybe an alternative approach to the patch is to add a "BuildRequire"?
Fedora's setuptools_scm package for 4.1.2 has a +toml sub-package: https://koji.fedoraproject.org/koji/rpminfo?rpmID=22407617 . Maybe an alternative approach to the patch is to add a "BuildRequire"?
Adding a BuildRequires on python3-setuptools_scm
was actually sufficient.
I will revert my patch in the SPEC file and push an update.
Thanks a lot for the super quick help! :+1:
I'm not sure whether this worked before, but according to the setuptools_scm README,
setuptools_scm
should be listed in thesetup_requires
field of thesetuptools.setup
call without thetoml
key. Running setup.py results in the following traceback:Below patch fixes the issue: