Hi Ben, thanks for taking the time to answer. Appreciated! On 22.11.22 at 09:50 Ben Greiner wrote:
`%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!
I still do not get why? If this only affects the python310 and python310-base packages during build and I am not rebuilding them, there is no negative impact? And inside "my packages", everything just seems to work? I do not want those packages to use the default python (which is 3.6) and I do not want to replace it with 3.10. The SLES-packages are apparently built in a way, that they can be installed in parallel without changing the default python.
For everything else, change python3- to python310-, either directly or thourgh a macro-redirection like %mypython.
Then I would need to also add some if-condition to set this mypython macro inside the spec for Tumbleweed, where I cannot change the prjconf. And hardcoding python310- will break, once Tumbleweed switches to python311 as its default python. But piggybacking on %primary_python everything works automagically (at least I hope so...). Kind Regards, Johannes -- Johannes Kastl Linux Consultant & Trainer Tel.: +49 (0) 151 2372 5802 Mail: kastl@b1-systems.de B1 Systems GmbH Osterfeldstraße 7 / 85088 Vohburg http://www.b1-systems.de GF: Ralph Dehner Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537