Am 22.11.22 um 09:27 schrieb Johannes Kastl:
Hi Ben,
On 21.11.22 at 16:19 Ben Greiner wrote:
Am 21.11.22 um 15:28 schrieb Johannes Kastl:
Due to my limited understanding of the python macros I used a simple prjconf to only build against the python3.10 version in the Python3 module of SLES15SP4.
%define pythons python310 %define primary_python python310
Substitute: python3-base python310-base
Macros: %pythons python310 %primary_python python310 :Macros
That did the trick for most of the packages, but I have two questions:
`%primary_python` affects the behavior and contents of the python310{,-base} packages. The definition for the primary interpreter is where /usr/bin/python3 points to. Thus, for having any effect, you have to rebuild pythin310{,-base} too. Once you have this, every python module in your stack which you rebuild yourself will have a `Provides: python3-foo` and override the python3-foo for Python 3.6. OTOH, this will require a lot of "Prefer:" lines, because the distro will now have multiple providers of python3-foo. Otherwise I do not see why `%primary_python` would need to be set at all.
Objections, your honour! :-)
I am not building the python310 packages, those are delivered by Leap/SLES. And they do not change the default python (i.e. where /usr/bin/python3 links to) and should not.
Then you should not redefine %primary_python to python310! Instread set %primary_python to python3, so that the Factory specfiles you are reusing are not confused. (It is not defined in vanilla Leap/SLE). For everything else, change python3- to python310-, either directly or thourgh a macro-redirection like %mypython. - Ben