#32 `rpmdev-newspec -t python` generates spec based on old guidelines
Closed 3 years ago by ngompa. Opened 7 years ago by churchyard.

When I run rpmdev-newspec -t python, the spec file is doen according to old guidelines, the template in spectemplate-python.spec is old.

Would you accept a commit that makes it follow the new guidelines?

https://fedoraproject.org/wiki/Packaging:Python


Help is certainly welcome there. I think there was a bug report somewhere open about this, but can't find it now.

Anyway, I already started this a while back, but didn't quite finish it because I believe the new python spec template or guidelines were still more or less in progress.

Another thing I wanted to address was use of python3_pkgversion stuff for EPEL. Not sure what the status of that is, at least the Fedora guidelines are silent about it, but I know the mechanism exists and is being already used by some packages. I do want this included in the templates.

I'm not sure if there were other things besides those two that were not quite finished the last time I looked into this, and unfortunately I've forgotten the exact status and details. But I pushed my work in progress to the python-spec-update branch in git, please use that as the basis for your work. Thanks in advance!

Replying to [comment:1 scop]:

Another thing I wanted to address was use of python3_pkgversion stuff for EPEL. Not sure what the status of that is, at least the Fedora guidelines are silent about it, but I know the mechanism exists and is being already used by some packages. I do want this included in the templates.

Well creating '''one''' template for '''both''' Fedora and EPEL might be tricky, as the Python 3 related stuff is very different.

I'll look at the branch.

Replying to [comment:2 churchyard]:

Well creating '''one''' template for '''both''' Fedora and EPEL might be tricky, as the Python 3 related stuff is very different.

One example where it works nicely is Fedora's pyflakes.spec. There's also the same stuff at least in python-libcdio.spec but that's IIRC untested as the dependencies are not available in EPEL, and I believe there are some other examples out there. At least those two don't look that tricky at all to me.

pyflakes.spec form master seems reasonable, but is not the same as the one form epel7 branch :(

Yeah, mrunge maintains pyflakes for epel7, haven't discussed this with him but the one in that branch is so far behind in versions that upgrading might be risky. I just needed a more recent one briefly for epel7 myself, so adapted the Fedora specfile to produce one.

Another example you can look at is the python-pika package. It's well-adapted to Fedora+EPEL Python 2/3 packaging guidelines.

Back to this after 2 years. The spec file now is horribly outdated. Can we please have python template (for Fedora) and python-epel template (for EPEL)?

Metadata Update from @churchyard:
- Issue close_status updated to: None

5 years ago

Or, at least an python3 only EPEL compatible thing when using -t python? I can work on that.

I'm okay with modernizing this now, so let's see how this goes.

while this goes, rpmdev-newspec -t python is outdated again

For packages with files and for Fedora 33+, the %python_provide call can be
removed. For packages without files or on Fedora 32 or on EPEL 7/8 they should
be replaced with %py_provides (although not worth doing it in mass). This is
documented at
https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_the_py_provides_macro

Metadata Update from @scop:
- Assignee reset

3 years ago

Metadata Update from @ngompa:
- Issue status updated to: Closed (was: Open)

3 years ago

This issue was handled satisfactorily already.

Login to comment on this ticket.

Metadata