Hi Sandro.
You are right that without information from git repository (git tags),
we cannot really use the full potential of setuptools_scm during the RPM
build process. AFAIK the most popular way how to bypass the
setuptools_scm mechanism is to use SETUPTOOLS_SCM_PRETEND_VERSION env
variable as described in
. But that
still requires the package to be installed.
I think the only way to omit setuptools_scm from the build process is to
create a patch or use sed/grep to remove it from dependencies and
hardcode the version but it's not ideal for future maintenance.
Have a nice day.
Lumír
On 10/2/22 12:10, Sandro wrote:
Hi,
I've recently submitted the python-PyMunin3 package, which has now
been approved and is available in f37 and rawhide. When porting
PyMunin to Python3, I also cleaned up the install process moving
everything into pyproject.toml. Little did I know back then, that this
would limit the availability of the package in Fedora.
As f36 is currently on setuptools 59.6.0, the package can't be build
there, since a pyproject.toml with the project table in it, requires
setuptools >=61 as Miro pointed out to me[1].
I've since received a request to make the package available for el9. I
myself already wanted it in f36, so I set out to work on lowering the
setuptools requirement[2] by moving the project table back into
setup.cfg just to hit another roadblock: setuptools_scm (see ticket).
That package is currently not available for el9 and the version in f35
is too old. With f35 going end of life soon, that's not a big deal,
but el9 is what was requested in the ticket[2].
Yet, thinking about the whole thing, all setuptools_scm does is
calculate the version of the release from information in the SCM. In
the RPM build environments that information is taken from the spec
file. I don't know much about the internal workings of rpmbuild, but
to me any BR on python-setuptools-scm (or the toml extra) seems
redundant.
So, can it be dropped or in some other way omitted as a build
requirement? I think that would make more Python packages available to
a broader audience. Although, I haven't done any research on that.
[1]
https://github.com/penguinpee/PyMunin3/pull/3
[2]
https://github.com/penguinpee/PyMunin3/issues/4
Happy Hacktober everyone,
-- Sandro
_______________________________________________
python-devel mailing list -- python-devel(a)lists.fedoraproject.org
To unsubscribe send an email to
python-devel-leave(a)lists.fedoraproject.org
Fedora Code of Conduct:
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines:
https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives:
https://lists.fedoraproject.org/archives/list/python-devel@lists.fedorapr...
Do not reply to spam, report it:
https://pagure.io/fedora-infrastructure/new_issue