Mailinglist Archive: opensuse-packaging (190 mails)

< Previous Next >
Re: [opensuse-packaging] python singlespec: how to convert your package
On 28.2.2017 12:31, Thomas Bechtold wrote:
Hi,

On Fri, 2017-02-17 at 18:31 +0100, jan matejek wrote:
7. If you are using update-alternatives, remove them.
Instead mark the executable as %python3_only:
%python3_only %{_bindir}/yourbinary
In most cases, we only need one version of the executable. If the
purpose of the tool is, e.g., reading EXIF metadata, we don't care if
python 2 or 3 reads them. (And the library files are still installed
for
both.)

Why? What if I only want the py2 version (including only the py2
dependencies)? Having the "binary" only shipped in the py3 package
means that I need all python3 packages installed.

Why would you want "only the py2 version?"
if it's a tool for which python is an implementation detail, you *should
not care* which version of python it is using.

The point of this is gradually moving towards python3-as-default. This
should mean that after enough packages are converted, the typical
installation will only have a Python 3 stack, not a Python 2 one.

In the meantime, you will need both, which is impractical, but it seems
better than doing a big switch-flip and mass-changing every "python-*"
to "python3-*". Also IIRC this (having both stacks) is already the case
because of some stacks (KDE, also GNOME i think?) moving to python 3.


OTOH, If it actually matters which python version you're using, then of
course you keep both and optionally provide update-alternatives. That's
what the addendum to this point says.


Best

Tom


< Previous Next >
Follow Ups