[SSSD] [patch] Python 3 support for sssd

Bohuslav Kabrda bkabrda at redhat.com
Fri Jul 18 14:22:07 UTC 2014


----- Original Message -----
> On Wed, Jul 09, 2014 at 08:43:27AM -0400, Bohuslav Kabrda wrote:
> > So, there are basically two different approaches to this and I don't think
> > any of them is "the best". I do admit I prefer the second one though:
> > 1) configure can be modified to accept an argument for --with-python, e.g.
> > user would be able to use "--with-python=python2" or
> > "--with-python=python3"; you have to do two builds if you want to build
> > for two Python releases
> > 2) configure can be modified to accept a "--with-python3" option in
> > addition to "--with-python"
> 
> One more question -- why do you see as preferable to select the python
> version we are building for? With your patch, the code would run equally
> well with /usr/bin/python pointing to python2 and python3, right? So can
> we just use whatever /usr/bin/python points to and be happy? Why should
> the maintainer select one (or even two) python releases?

Because some libraries/applications depending on sssd might not be ported to whichever Python sssd is compiled with. E.g. if you compiled just with python3, people wouldn't be able to import sssd from python2 and vice versa. All major distributions I know build parallel Python 2 and Python 3 stacks because of it and they try to have as much built for both Python versions as possible. Imagine you would stop building python2 bindings while half of your fedora dependencies isn't ported to Python 2 :)
To sum it up, you should be able to choose what Python you're building with, IMO.
Also, because of Python upstream recommendation, /usr/bin/python will probably keep pointing to python2, maybe even forever. So it will come down to each Linux distro own policy to say which Python is the "default one" and which is the "optional one".

> > (libreport is doing something that is closer to 2), although they strictly
> > require both Python major versions and don't build if one is not present
> > [3].
> 
> I don't think we should require both python versions.

I tend to agree, I just wanted to show you all options that I know of.

Thanks a lot,
Slavek



More information about the sssd-devel mailing list