Am 10.01.22 um 11:19 schrieb Simon Lees:
On 1/10/22 20:40, Ben Greiner wrote:
On 1/9/22 21:53, Ben Greiner wrote: I am mostly concerned with the inability to use newer python-rpm-macros features like %pyunittest, %python_compileall and BuildRequires: %{python_module foo if %python-base < 3.10} because that will break the
Am 10.01.22 um 01:55 schrieb Simon Lees: package build for those repos even if the source code itself would still work with 3.6. I opened boo#1187473 (upon request by the maintainer!) half a year ago, which was masked by the :backports usage, but comes to the surface again with the removal. Not to speak about all those cases where this caused problems in other projects. In the past we have shipped similar updates to rpm-macros into the Update repo and not released them to customers then with the updates repo enabled they can still be used for builds. That is probably the best solution to this problem or we update the wiki to indicate these features don't exist in 15.3.
I'm okay with that. Don't forget the necessary prjconf definitions, which you need to wrap into %if conditions now that they are not inherited from a non-TW repo anymore:
%if "%_repository" == "15.3" || "%_repository" == "15.4" Macros: ## PYTHON MACROS BEGIN # adapted form of https://github.com/openSUSE/python-rpm-macros/blob/master/default-prjconf for SLE/Leap # requires python-rpm-macros >= 20210204 # order of %pythons is important: The last flavor overrides any operation on conflicting files and definitions during expansions, # making it the "default" in many cases --> keep the primary python3 provider at the end. %pythons %{?!skip_python2:python2} %{?!skip_python3:python3} %add_python() %{expand:%%define pythons %1 %pythons}
# This method for generating python_modules gets too deep to expand for rpm at about 5 python flavors. # Hence, python_module_iter is replaced by python_module_lua in macros.lua. # However, OBS cannot expand lua, but has a much higher expansion depth, so this works fine for the server side resolver. %python_module_iter(a:) %{expand:%%define python %{-a*}} ( %python-%args ) %{expand:%%{?!python_module_iter_%1:%%{python_module_iter -a%*}}%%{?python_module_iter_%1}} # pseudo-undefine for obs: reset for the next expansion within the next call of python_module %python_module_iter_STOP %global python %%%%python %python_module() %{?!python_module_lua:%{expand:%%define args %{**}} %{expand:%%{python_module_iter -a %{pythons} STOP}}}%{?python_module_lua:%python_module_lua %{**}} ## PYTHON MACROS END :Macros %endif
- Ben