Building python packages for SLES15 with python3.10: "nothing provides if, nothing provides %python-version < 3.11"
Hi all, I am currently fixing my repository setup for building ansible & Co for SLES15 with the Python3 module. One thing that pops up a lot is this "unresolvable": nothing provides if, nothing provides %python-version < 3.11 It comes from this line in the spec:
BuildRequires: %{python_module tomli if %python-version < 3.11}
I guess the macros in my SLES15 projects do not yet know that syntax. Am I right that this part of the Factory prjconf needs to be added:
# prjconf definitions for python-rpm-macros # 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 %{**}}
It seems to solve this unresolvable, but I am not sure if it does "too much" and causes issues down the line? Kind Regards, Johannes -- Johannes Kastl Linux Consultant & Trainer Tel.: +49 (0) 151 2372 5802 Mail: kastl@b1-systems.de B1 Systems GmbH Osterfeldstraße 7 / 85088 Vohburg http://www.b1-systems.de GF: Ralph Dehner Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537
Hi Johannes, Am 04.05.23 um 10:48 schrieb Johannes Kastl:
Hi all,
I am currently fixing my repository setup for building ansible & Co for SLES15 with the Python3 module.
One thing that pops up a lot is this "unresolvable":
nothing provides if, nothing provides %python-version < 3.11
It comes from this line in the spec:
BuildRequires: %{python_module tomli if %python-version < 3.11}
I guess the macros in my SLES15 projects do not yet know that syntax.
Am I right that this part of the Factory prjconf needs to be added:
# prjconf definitions for python-rpm-macros # 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 %{**}}
That is correct. It also requires a moderately recent python-rpm-macros for %python_module_lua to be defined, but I am sure you already have that.
It seems to solve this unresolvable, but I am not sure if it does "too much" and causes issues down the line?
See also Dirk's answer in the other thread. d:l:p:backports has similar entries in its prjconf. Only the SUSE folks can tell you if and when they intend to move the definitions to more official SLE15 projects.
Kind Regards, Johannes
- Ben
Hi Ben, On 05.05.23 at 10:17 Ben Greiner wrote:
Am 04.05.23 um 10:48 schrieb Johannes Kastl:
Am I right that this part of the Factory prjconf needs to be added:
[snip]
That is correct. It also requires a moderately recent python-rpm-macros for %python_module_lua to be defined, but I am sure you already have that.
Thanks for the confirmation! Kind Regards, Johannes -- Johannes Kastl Linux Consultant & Trainer Tel.: +49 (0) 151 2372 5802 Mail: kastl@b1-systems.de B1 Systems GmbH Osterfeldstraße 7 / 85088 Vohburg http://www.b1-systems.de GF: Ralph Dehner Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537
Am Freitag, 5. Mai 2023, 10:17:19 CEST schrieb Ben Greiner: Hi Ben,
See also Dirk's answer in the other thread. d:l:p:backports has similar entries in its prjconf. Only the SUSE folks can tell you if and when they intend to move the definitions to more official SLE15 projects.
It is already in SUSE:SLE-15-SP4:Update in OBS, but will require one of the upcoming maintenance updates to be functional. We are talking about days here. Greetings, Dirk
participants (3)
-
Ben Greiner
-
Dirk Müller
-
Johannes Kastl