On 23.3.2017 14:46, Luigi Baldoni wrote:
Still, I have another question: I was left with the impression that unified packages had to produce a module for both pythons but binaries only for python3. Is that correct or are there exceptions to that rule?
There are exceptions. If you expect that your package will be part of a Python 2 stack -- for example, if you're packaging something that is part of OpenStack (which is python2-based in openSUSE for now) -- then you should package binaries for all pythons, and use alternatives to choose between them. If there are differences between the python2 and python3 version -- for example, a webserver that is scriptable through python scripts -- then you should package versioned binaries ("/usr/bin/foo-2.7") for all pythons, and the unversioned one ("/usr/bin/foo") for Python 3 only. (if the package only installs /usr/bin/foo, you can use %python_clone to make /usr/bin/foo-2.7) For example, if your binary is called "runprogram": %python_install %python_clone %{buildroot}%{_bindir}/runprogram (...) %files %python_files %{_bindir}/runprogram-%{python_bin_suffix} %python3_only %{_bindir}/runprogram And of course when you actually *want* alternatives as a way to choose which version you run, then you should do that :) m.