On Sun, Jul 17, 2016 at 6:09 AM, Björn Persson <Bjorn@rombobjörn.se> wrote:
It sounds like I should start trying to get sphinxcontrib-adadomain
ported to Python 3.

Definitely!

> I have two possible fixes:
>
> The first would be to decouple the commands from the libraries. Since
> the package name sphinx is already taken by the search engine,
> something like python-sphinx-bin may be appropriate. Once separated,
> the command would default to python3 since the packaging guidelines
> say it Python 3 versions should be preferred when equivalent.

If this approach is chosen, will the commands still invoke the Python 2
version if only that one is installed?

No, the command would require the python3 version, the second option would allow the python commands to be the default if it's the only one installed.
 

> The second option would be to retain the multiple versions, but to
> manage the links with alternatives so the unversioned commands will
> default to whatever version is installed and again, Python 3 would be
> preferred if both were installed.

This approach seems like it would work for my use case.

Ahven uses Sphinx to generate its documentation, using Sphinx's
generated makefile that invokes sphinx-build. I have ahven.spec
regenerate the documentation, but the makefile is generated upstream.
Until the Ada domain gets ported, the Ahven build will have to use the
Python 2 Sphinx, but I'd rather not encode that in ahven.spec. I want
to keep that dependency contained in python-sphinxcontrib-adadomain.
Ahven shouldn't need to even know that Sphinx is written in Python.

If I can have python-sphinxcontrib-adadomain depend on the Python 2
Sphinx specifically, and then have the ahven package require
python-sphinxcontrib-adadomain, plus python-sphinx or python-sphinx-bin
or whatever but not python2-sphinx, and invoke sphinx-build and know
that it will run on Python 2, then I'm satisfied.

It sounds like the first option wouldn't work for your use case, since you have a hard Python 2 dependency until sphinxcontrib-adadomain gets a Python 3 package. The only way it could work would be to modify the make file during the build. The second option would work as long as you don't have python3-sphinx installed during the package build. That should be fine in a mock build, but if someone wanted to do a rebuild on their regular system and had python3-sphinx installed, they'd have to set the sphinx version with the alternatives command.


It seems like the second option, using alternatives, would be the preferred method so as to not break things. My current thinking is to implement this in the next package update, but to keep Python 2 as the default (if both are installed) for Fedora 24, then make Python 3 the default in Rawhide and Fedora 25.

Avram