#28 [patch] improvements to Python specfile template
Closed: Fixed None Opened 9 years ago by bkabrda.

Hi,
this patch includes two improvements to python spec template:

  • it introduces python3 subpackage template, as used in Fedora (not sure if this is generally desirable for you, but it's very common in Fedora and can save people some time, while also encouraging python 3 usage)
  • it replaces usage of __python macros with their __python2 counterparts to stay consistent with Fedora's python guidelines (this change was suggested by Toshio at [1])

Thanks for considering.

[1] https://fedorahosted.org/fpc/ticket/327#comment:14


The implementation looks pretty much ok, but I'd say the with_python3 definition should be replaced with %bcond_with python3 (on not fedora) and %bcond_without python3 (on fedora) and uses of it accordingly, see %bcond_* docs in /usr/lib/rpm/macros.

Replying to [comment:1 scop]:

The implementation looks pretty much ok, but I'd say the with_python3 definition should be replaced with %bcond_with python3 (on not fedora) and %bcond_without python3 (on fedora) and uses of it accordingly, see %bcond_* docs in /usr/lib/rpm/macros.

Good point. Actually, this is implemented precisely according to Python packaging guidelines. This makes me wonder why the guidelines don't use bcond. I'd first have to dig into that and I've been burried so deep into other stuff lately, that I don't have any time for that. So if this is a blocker for merging, let's leave this bug open and I'll get to it in time.

I happened to need this template myself so pushed as [606506] and further tweaked in [ba6571].

Login to comment on this ticket.

Metadata