python build environemnt Leap 15.3
Hi, I needed to branch the package python-cairocffi from d:l:p into a local repository, in order to build it for Leap 15.3 Build fails with the error message: buildinfo is broken... it says: unresolvable: nothing provides if nothing provides (%python-base without python36-base) This probably comes from the line BuildRequires: %{python_module numpy if (%python-base without python36-base)} Can anyone guide me what needs to be tweaked? Thanks Axel
Am 16.09.21 um 10:56 schrieb Axel Braun:
Hi,
I needed to branch the package python-cairocffi from d:l:p into a local repository, in order to build it for Leap 15.3
Build fails with the error message:
buildinfo is broken... it says: unresolvable: nothing provides if nothing provides (%python-base without python36-base)
This probably comes from the line BuildRequires: %{python_module numpy if (%python-base without python36-base)}
Can anyone guide me what needs to be tweaked?
Possible (but not exhaustive) options: 1. Also branch a recent python-rpm-macros from d:l:p:Factory or d:l:p:backports into your project and add the Macros: section from https://build.opensuse.org/projects/devel:languages:python:backports/prjconf to your own prjconf in order to support the syntax: 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 2. Let OBS do the above automatically by adding d:l:p:backports to the repo path (that's what d:l:p is doing) 3. Change the line to `BuildRequires: python3-numpy` or `BuildRequires: %{python_module numpy}` Note that the latter will make the TW build unresolvable because it has no python36-numpy
Thanks Axel
Ben
Hello Ben, Am Donnerstag, 16. September 2021, 19:31:09 CEST schrieb Ben Greiner:
Am 16.09.21 um 10:56 schrieb Axel Braun:
....
2. Let OBS do the above automatically by adding d:l:p:backports to the repo path (that's what d:l:p is doing)
Thanks for your exhaustive answer. I tried the second solution, and now its up and running. I had not seen that backports repo is additionally needed for 15.3. Cheers Axel
participants (2)
-
Axel Braun
-
Ben Greiner