Python package both module as well as application

I’m building python-srt (https://github.com/cdown/srt), which is a dependency of another package I am working on. The error I am getting is:

   19s] found conflict of python36-srt-3.4.1-0.noarch with python38-srt-3.4.1-0.noarch: 
   19s]   - /usr/bin/srt 
   19s]   - /usr/bin/srt-fixed-timeshift 
   19s]   - /usr/bin/srt-linear-timeshift 
   19s]   - /usr/bin/srt-lines-matching 
   19s]   - /usr/bin/srt-mux 
   19s]   - /usr/bin/srt-normalise 
   19s]   - /usr/bin/srt-play 
   19s]   - /usr/bin/srt-process 
   19s] found conflict of python36-srt-3.4.1-0.noarch with python39-srt-3.4.1-0.noarch: 
   19s]   - /usr/bin/srt 
   19s]   - /usr/bin/srt-fixed-timeshift 
   19s]   - /usr/bin/srt-linear-timeshift 
   19s]   - /usr/bin/srt-lines-matching 
   19s]   - /usr/bin/srt-mux 
   19s]   - /usr/bin/srt-normalise 
   19s]   - /usr/bin/srt-play 
   19s]   - /usr/bin/srt-process 
   19s] found conflict of python38-srt-3.4.1-0.noarch with python39-srt-3.4.1-0.noarch: 
   19s]   - /usr/bin/srt 
   19s]   - /usr/bin/srt-fixed-timeshift 
   19s]   - /usr/bin/srt-linear-timeshift 
   19s]   - /usr/bin/srt-lines-matching 
   19s]   - /usr/bin/srt-mux 
   19s]   - /usr/bin/srt-normalise 
   19s]   - /usr/bin/srt-play 
   19s]   - /usr/bin/srt-process

I totally understand what is causing the error and I know this wouldn’t be an issue if I would package it as ‘srt’. The files in /usr/bin are present in all three versions of the library, so the build throws this error. This package is both an application as well as a module, and following the documentation:
*
There are some corner cases as to what is an application and what is a module - for example, many modules come with simple command-line tools that allow you to use a subset of their functionality directly. The rule of thumb is this: if this package is going to be a dependency of some other Python application, apply the naming policy, otherwise keep it just as the module name.*
Source: https://en.opensuse.org/openSUSE:Packaging_Python#Naming_policy

The python-srt package is a dependency of ffsubsync, which is a python application I am trying to build.

So the problem is clear, but the solution eludes me.

Hi
Use the update alternatives macro for each of the binaries…

In %install;


....
%python_clone -a %{buildroot}%{_bindir}/srt*
....

In %files


%files
....
%python_alternative %{_bindir}/srt*
....

If the wildcard doesn’t work then you need a separate line for each binary.