On mar, 2023-05-02 at 12:48 +0200, Johannes Kastl wrote:
Hi Daniel,
thanks for the reply.
On 26.04.23 at 17:51 Daniel Garcia wrote:
On mié, 2023-04-26 at 13:34 +0200, Johannes Kastl wrote:
(I am asking because I needed to jump through quite some hoops to build ansible for SLES15 with python3.10 from the Python3 module. If this macro makes it easier to do so I would be interested...)
Possibly it will make it easier, but for python 3.11.
I'll take what is avaiable in the Python3 module. :-)
We're building a reduced list of basic python packages, the modern version, just directly from Tumbleweed, to provide it in SLE15-SP4, so it should be available, but just in the python module.
Here you can find the devel project that we're using to build the list of packages and fix issues: https://build.opensuse.org/project/show/home:dirkmueller:acdc:as_python3_mod...
I've just updated the initial doc in the wiki, added by Robert, with a more detailed explanation: https://en.opensuse.org/openSUSE:Packaging_Python#Python_3_(Leap_Future)
1. Currently I set those lines in the prjconf in the SLES15+Python3 projects: ``` %define pythons python310 Macros: %pythons python310 :Macros ```
IIUC I can just remove this, once the macro was added to each package?
That's exactly what the macro does (but with python311), so you'll be able to remove it from your prconf and just use the macro when it's available.
2. Currently I hardcode the versions for Tumbleweed and SLES15 in e.g. the ansible-core spec file:
``` %if 0%{?suse_version} < 1550 # Leap15, SLES15 %define pythons python310 %define ansible_python python310 %define ansible_python_executable python3.10 %define ansible_python_sitelib %python310_sitelib %else # Tumbleweed %define pythons python3 %define ansible_python python3 %define ansible_python_executable python3 %define ansible_python_sitelib %python3_sitelib %endif ```
I assume that this needs to be adapted to 3.11 (and possibly other versions in the future?)?
This should be adapted, but in this case you'll need to continue modifying the pythons for tumbleweed to build just for the primary python, and setting the corresponding so at the end I don't see any difference if using the new macro or not, because this package doesn't use %python_subpackages -- Daniel García Moreno Python Packager