On mié, 2023-04-26 at 08:22 -0400, Robert Schweikert wrote:
On 4/26/23 08:07, Eric Schirra wrote:
Am Dienstag, 25. April 2023, 09:20:33 CEST schrieb Daniel Garcia:
On mar, 2023-04-25 at 08:32 +0200, Eric Schirra wrote:
I see more and more %{?sle15_python_module_pythons} and %{sle15modernpython} in packages changes.
But i can't find any documentation about it. Not in wiki and not in python-rpm-macro.
So what's the deal with "%{?sle15_python_module_pythons}" ? And what's the deal with "%{sle15modernpython}" ?
This is related to SLE, we are trying to make the changes in factory to do not have different sources for the modern python packages provided there.
This macro won't do anything in Tumbleweed or other versions where it's not defined and in SLE it's just to set the "pythons" macro to a different value, so the multibuild can produce python3.11 packages there.
The final macro name is the first one, "%{?sle15_python_module_pythons}", the second one is a devel name and if it's in some devel package or Factory should be renamed to the other one.
Thank you very much for your answer. Two more questions. 1. do I understand it right, as long as the macro is not defined in python- rpm-macros it will not be executed in tumbleweed or leap?
The definition will come from the project config, not from the python-rpm-macros package. It will not be set in TW. The leap setting will be inherited from SLE which will set this to using 3.6 and 3.11.
The effect is that every package that has
%{?sle15_python_module_pythons}
will build against Python 3.6 and python 3.11
It's not exactly like that, just a bit different. These packages will just build for the modern python, that will be python 3.11. The python 3.6 version will be built from a different source package, that's the current one existing in SLE. All new python packages that we're planning to add will build with the latest version of python. Our test project has this macro: %sle15_python_module_pythons() %global pythons python311 The idea is to provide a modern version of a reduced list of python packages and build this list with python 3.11. So python 3.6 will continue as is, with it's python packages and old versions and there will be a modern version of some packages that will work with python 3.11.
2. is this still described somewhere in the wiki?
I added
""" ==== Python 3 (Leap Future) ==== Leap has 2 Python interpreters, inherited from SLE, Python 3.6 and Python 3.11. To build modules with both interpreters use
* <code>%{?sle15_python_module_pythons}</code>
The macro is defined in the project setup in OBS. ----- """
Not all the pieces are in place yet, Matej, Dirk and others are still doing a lot of legwork to make this all come together.
Thanks for the doc update. -- Daniel García Moreno Python Packager