Closed MrMEEE closed 3 months ago
Thank you for the contribution! I looked at the code in more detail. I started to describe some points but eventually went on straight to hacking and I think I've got this in https://github.com/befeleme/pyp2spec/pull/46 - I hope you don't mind and if you can test my PR, that would be great!
I took great inspiration from how the specfiles look in C9S and wanted to make the output as close to this as possible (see e.g. python3.12-requests.
The main points:
%{python_pkgversion}
evaluates to 3
if it's not defined differently. So we could get rid of all the if/elses and just convert python3-
to python%{python3_pkgversion}
strings everywhere. We only need to keep the first line's if clause.python_name
should be versioned too. It's better not to name the versioned packages with the standard component name, because IRL they can exist (and sometimes do) in parallel. So this is to avoid component name conflicts.
Added support for specific python versions, issue #16
I haven't added tests for the version stuff yet, but tests for the rest looks good
Feel free to comment on anything, I hope this is up to standards (or close by) :D