diff --git a/python-flit-core.spec b/python-flit-core.spec index f26c8e3..e63eb08 100644 --- a/python-flit-core.spec +++ b/python-flit-core.spec @@ -18,12 +18,8 @@ %define modname flit-core %define mypython python -# this must be hardcoded until obs can read it from a prjconf definition -%if 0%{suse_version} >= 1550 -%define primary_python python310 -%else -%define primary_python python3 -%endif +# fallback if primary_python is not available from the project configuration +%{?!primary_python:%define primary_python python3%{?!sle_version:10}} %global flavor @BUILD_FLAVOR@%{nil} %if "%{flavor}" == "primary" # this one is built in Ring0 @@ -33,7 +29,7 @@ %if "%{flavor}" == "" # The rest is in Ring1 %define pprefix python -%if 0%{suse_version} >= 1550 || 0%{?sle_version} == 150500 +%if 0%{?suse_version} >= 1550 || 0%{?sle_version} == 150500 %{expand:%%define skip_%{primary_python} 1} BuildRequires: python3-base >= 3.6 %else @@ -68,6 +64,7 @@ BuildRequires: python-rpm-macros BuildArch: noarch # SECTION boo#1186870: we are a transitive build dependency of python-packaging which is used by pythondistdeps.py normally creating this entry #!BuildIgnore: python3-packaging +#!BuildIgnore: %{primary_python}-packaging Provides: %{mypython}%{python_version}dist(%{modname}) = %{version} %if "%{python_flavor}" == "python3" || "%{python_provides}" == "python3" Provides: %{mypython}3dist(%{modname}) = %{version}