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
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 https://github.com/pypa/setuptools_scm/#environment-variables . 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@lists.fedoraproject.org To unsubscribe send an email to python-devel-leave@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.fedoraproje... Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
On 02. 10. 22 12:10, Sandro wrote:
[setuptools_scm] is currently not available for el9...
But it is. It' part of the RHEL 9 CRB repository. However, also version 6.0.1. Why do you require >= 6.2 exactly?
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.
It is indeed redundant, but sometimes a bit hard to patch out.
On 03-10-2022 12:14, Miro Hrončok wrote:
On 02. 10. 22 12:10, Sandro wrote:
[setuptools_scm] is currently not available for el9...
But it is. It' part of the RHEL 9 CRB repository. However, also version 6.0.1. Why do you require >= 6.2 exactly?
I was following the instructions in the project's README:
https://github.com/pypa/setuptools_scm#pyprojecttoml-usage
Regarding availability for el9, I didn't know (where to look). I looked on src.fp.o:
https://src.fedoraproject.org/rpms/python-setuptools_scm
There's an ancient version for el7, but nothing for el8 or el9.
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.
It is indeed redundant, but sometimes a bit hard to patch out.
One for the wish list then. Why chase down redundant build dependencies?
-- Sandro
On 03. 10. 22 12:55, Sandro wrote:
Regarding availability for el9, I didn't know (where to look). I looked on src.fp.o:
https://src.fedoraproject.org/rpms/python-setuptools_scm
There's an ancient version for el7, but nothing for el8 or el9.
That will only help with EPEL packages. To see also RHEL packages, I recommend installing CentOS 9 Stream repo file for repoquery (attached) to /etc/yum.repos.d/c9s.repo.
Then you can query like this:
$ repoquery --repo=c9s-{baseos,appstream,crb} python3-setuptools_scm --latest=1 ... python3-setuptools_scm-0:6.0.1-1.el9.noarch
Or components like this:
$ repoquery --repo=c9s-{baseos,appstream,crb}-source python-setuptools_scm \ --latest=1 ... python-setuptools_scm-0:6.0.1-1.el9.src
On 03-10-2022 13:29, Miro Hrončok wrote:
On 03. 10. 22 12:55, Sandro wrote:
Regarding availability for el9, I didn't know (where to look). I looked on src.fp.o:
https://src.fedoraproject.org/rpms/python-setuptools_scm
There's an ancient version for el7, but nothing for el8 or el9.
That will only help with EPEL packages. To see also RHEL packages, I recommend installing CentOS 9 Stream repo file for repoquery (attached) to /etc/yum.repos.d/c9s.repo.
Thank you, Miro. That really helps. It will sure come in handy in future build attempts.
-- Sandro
On 03-10-2022 12:55, Sandro wrote:
On 03-10-2022 12:14, Miro Hrončok wrote:
On 02. 10. 22 12:10, Sandro wrote:
[setuptools_scm] is currently not available for el9...
But it is. It' part of the RHEL 9 CRB repository. However, also version 6.0.1. Why do you require >= 6.2 exactly?
I was following the instructions in the project's README:
It's all lies and snake oil. It builds perfectly fine using version from git tag with "setuptools_scm[toml]>=6.0.0".
churchyard++ (I wish that would work on mailing lists).
-- Sandro
On 03. 10. 22 13:30, Sandro wrote:
I was following the instructions in the project's README:
It's all lies and snake oil.
Upstream lists the requirement of the recent enough version in their documentation, because the users are reading the current version of the documentation and if an older version was used, not all information from the current documentation would be accurate.
If you look e.g. at https://github.com/pypa/setuptools_scm/tree/v6.0.1#pyprojecttoml-usage the requirement was lower.
It was recently bumped in https://github.com/pypa/setuptools_scm/commit/15049053b8 when [toml] was no longer needed -- I suggest adding [toml] back if you lower the required version.
It works without [toml] in the EPEL 9 RPM package only by coincidence: because the pyproject RPM macros depend on python3-toml on EPEL 9.
On 03-10-2022 19:41, Miro Hrončok wrote:
On 03. 10. 22 13:30, Sandro wrote:
I was following the instructions in the project's README:
It's all lies and snake oil.
Upstream lists the requirement of the recent enough version in their documentation, because the users are reading the current version of the documentation and if an older version was used, not all information from the current documentation would be accurate.
I understand. There was a bit of frustration in my remark. What I think would really help is some sort of feature matrix. If you use feature foo, minimum version required is x.y.z
I recently stumbled on the same issue trying to determine minimum required version of setuptools. Especially for the RPM build systems you want to set it as low as possible, satisfying as many build environments as possible.
If you look e.g. at https://github.com/pypa/setuptools_scm/tree/v6.0.1#pyprojecttoml-usage the requirement was lower.
It was recently bumped in https://github.com/pypa/setuptools_scm/commit/15049053b8 when [toml] was no longer needed -- I suggest adding [toml] back if you lower the required version.
It works without [toml] in the EPEL 9 RPM package only by coincidence: because the pyproject RPM macros depend on python3-toml on EPEL 9.
I'm still using setuptools_scm[toml] as a build requirement:
https://github.com/penguinpee/PyMunin3/commit/8f22eec3409711d4b7a5a5a0787859...
In you second link it looks like they removed it. But I think it's the other way around:
https://github.com/pypa/setuptools_scm/compare/v6.2.0...v7.0.5#diff-7b3ed02b...
My diff is base: v6.2.0 <- compare: v7.05. Yours seems to be base: v7.0.5 <- compare: v6.2.0.
I might be wrong, but on the front page (main) the toml extra is listed as a requirement and that's what I have in my pyproject.toml.
But I see now why one needs two pairs of glasses doing Python. ;-D
-- Sandro
On 03. 10. 22 22:50, Sandro wrote:
I'm still using setuptools_scm[toml] as a build requirement:
https://github.com/penguinpee/PyMunin3/commit/8f22eec3409711d4b7a5a5a0787859...
Good.
In you second link it looks like they removed it. But I think it's the other way around...
They actually removed it and added it back later, so never mind me :)
python-devel@lists.fedoraproject.org