-
Notifications
You must be signed in to change notification settings - Fork 20
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
Define a default provider for python3-foo #71
Conversation
compile-macros.sh
Outdated
@@ -5,7 +5,8 @@ FLAVORS="python2 python3 python36 python38 pypy3" | |||
# order of BUILDSET is important, it is copied to order of %pythons, | |||
# and that determines the last installed binary | |||
BUILDSET="python2 python3 python36 python38" | |||
|
|||
DEFAULT_PROVIDER=${BUILDSET##* } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for this pull request, but I don’t like this variable. There should be just one source of wisdom on what’s the current provider, and that should be %primary_interpreter == 1
in the appropriate python*.spec
file. We cannot read that macro, but we can find out what /usr/bin/python3
points to, and that should be the provider for python3-*
packages. Not sure how to expand links in Lua (or with the RPM Lua macros, could stat(2)
help?).
Perhaps something on this tune:
local sympython = "/usr/bin/python3"
local fullpath = io.popen("readlink -f '" .. sympython .. "'", 'r'):read('a')
fullpath = fullpath:gsub('[\n\r]*$','')
print(fullpath)
011736c
to
2138801
Compare
How about the latest commit? I went with a |
2138801
to
9122e0d
Compare
Looking at https://bugzilla.suse.com/show_bug.cgi?id=1177477 and thinking “How do we deal with update-alternatives?”. Will we automatically switch all alternatives to default (not changing already non-default values) when changing the primary Python provider? Also, things like |
Sorry, I do not quite understand. How is this relevant to the primary provider during buildtime?
Do we need to increase the priority of the |
I do not understand how that situation can occur with the current python36 and python38 packages in Tumbleweed. |
I don’t understand either, but I haven’t switched any system from python3.6 to python3.8 yet. Actually, thinking about it, I don’t think we have ever had |
Sidenote: I noticed a few days ago that Ubuntu has sitelib in python3 rather than python3.X so all flavors use the same sitelib and populate the cache with files for their version. |
Yep we won't be changing to Debian layout. This layout we have is used among all rpm distros and it would not help us if users could not inject rpms from Fedora if they really need so. Debian world has a common folder for the python and specify just minimal supported and thats it. |
It was just a sidenote ;) |
OK, please, rebase this PR, and I will happily merge it. Thank you! |
Done. |
My attempt at #69