jan matejek-4 wrote
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.
Ok. I have a number of binaries and for the sake of simplicity let's just call them foo and bar. So, %python_install installs them unversioned and then I have %python_clone -a %{buildroot}%{_bindir}/foo %python_clone -a %{buildroot}%{_bindir}/bar Since I don't want to create a group I also do this: %post %python_install_alternative foo %python_install_alternative bar %preun %python_uninstall_alternative foo %python_uninstall_alternative bar and then %files %{python_files} %python_alternative %{_bindir}/foo %python_alternative %{_bindir}/bar How come I see update-alternatives: using /usr/bin/foo-3.6 to provide /usr/bin/foo (foo) in auto mode update-alternatives: using /usr/bin/bar-3.6 to provide /usr/bin/bar (bar) in auto mode ... warning: file /usr/bin/foo: remove failed: No such file or directory warning: file /usr/bin/bar: remove failed: No such file or directory at the end of the build? (there are slight differences in Leap, not sure if relevant at this point) Am I forced to pick one of the executables and create a group around it or is there an alternative (no pun intended)? Regards -- View this message in context: http://opensuse.14.x6.nabble.com/python-singlespec-how-to-convert-your-packa... Sent from the opensuse-packaging mailing list archive at Nabble.com. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org