On 05/27/2016 10:10 AM, Tomas Orsava wrote:
> I think the python2-XXX package in the examples is missing
something
> like this:
>
> Requires: %{_bindir}/sample-exec
>
> Make sense?
>
I believe there is a misunderstanding. In your first message you said
"But the guidelines require the py3 version of the script in the py2
package." That is incorrect.
The guidelines only require you to package the Python 3 version of the
script. They are not very clear on where you should put it, but the only
logical place is of course the Python 3 subpackage (or a new subpackage
with only the executable script that relies on the Python 3 subpackage).
You should never put the Python 3 executable in the Python 2 subpackage.
That's fine. But unless one of two things are done the guidelines as
they currently stand will leave you with a broken python2-XXX package.
You either have to copy the Py2 version of the script to
%{_bindir}/sample-exec-2.7 after the %py2_install runs instead of
deleting the scripts as is currently recommended. -OR- you need to add a
Requires on the %{_bindir}/sample-exec to the python2-XXX package as I
suggested above.
If one of these 2 things are not done then someone installing just the
python2-XXX version of the package (what I expect might be a common user
action) will not have a script that can execute.
Also neither set of guidelines include examples of setting up links if
you elect to use versioned scripts (e.g. %{_bindir}/sample-exec-2.7,
%{_bindir}/sample-exec-3.5). The guidelines seem to suggest it's best to
avoid versioned scripts which I would agree with, if that is the case
then of the two options discussed above only the Requires fix will work.
--
John