Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python3 pkgversions #45

Closed
wants to merge 3 commits into from
Closed

Conversation

MrMEEE
Copy link
Contributor

@MrMEEE MrMEEE commented Mar 28, 2024

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

@befeleme
Copy link
Owner

befeleme commented Apr 5, 2024

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 #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.
  • if alternative Python is set, 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.
  • the previous makes it moot to define a versioned subpackage. Let's create it only if an alternative Python is not defined.

@befeleme
Copy link
Owner

#46 was merged, pyp2spec 0.9.0 containing the change was released.

@befeleme befeleme closed this Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants