On vie, 2023-06-16 at 11:16 +0200, Eric Schirra wrote:
Am Freitag, 16. Juni 2023, 09:07:29 CEST schrieb Daniel Garcia:
The macro %{?sle15_python_module_pythons} builds only one version. In the case of Leap 15.5, this is 3.11.
But I am not sure about that either.
I also still don't understand why you can't just build all python versions, like with Tumbleweed.
The macro %{?sle15_python_module_pythons} defaults to "%global pythons python311" in Leap15.4 and it's empty in TW. %pythons is "python3" in Leap 15.4 and "python39 python310 python311" in TW. This macro is just to override the default "%pythons", so if you've a custom project and want to build for something different you can just override this macro in the project configuration.
For example: %sle15_python_module_pythons() %global pythons python311 python310 python3
Will build all packages with that macro for python311, python310 and python3 in your project.
This macro is there to make it easy to build modern packages for different python versions in SLES and Leap, without touching stable packages, so the "%pythons" macro is not modified at project level.
Okay. Thank you for the explanation.
Do I understand it correctly then? If the spec of the python package contains %{?sle15_python_module_pythons}, then I don't need to modify the spec file if I need the package for python3 and python3.11.
Instead, I adjust my ProjectConfig as follows:
%sle15_python_module_pythons() %global pythons python311 python3
Right?
Yes, that's correct -- Daniel García Moreno Python Packager