On 08/15/2013 03:47 PM, Claudio Freire wrote:
On Thu, Aug 15, 2013 at 10:15 AM, Sascha Peilicke
wrote: On 08/15/2013 02:16 PM, Christian Boltz wrote:
Hello,
Am Dienstag, 13. August 2013 schrieb Sascha Peilicke:
the next openSUSE release will have very strong support for Python3 and I've been working a lot on improving parallel installation of Python2 / Python3 modules. In other words, the most important packages (virtualenv, pip, nose, coverage, Sphinx, ...) now use update-alternatives.
Are there plans to make the /usr/bin/python symlink managed with update- alternatives? If yes, this will open an interesting can of worms ;-)
I'm a bit surprised this isn't the case already. When looking at the mess in /usr/bin, I'm close to puking into the next trashcan. Who is supposed to manage all these links by hand?
/usr/bin/python -> python2.7 /usr/bin/python2 -> python2.7 /usr/bin/python2.7 /usr/bin/python2.7-config /usr/bin/python2-config -> python2.7-config /usr/bin/python3 -> python3.3 /usr/bin/python3.3 /usr/bin/python3.3-config -> python3.3m-config /usr/bin/python3.3m /usr/bin/python3.3m-config /usr/bin/python3-config -> python3.3-config /usr/bin/python-config -> python2-config
So I'm gonna fix this ASAP :-)
This is upstream
Just configure, make make install will do that from a pristing tarball.
So? In fact, upstream cares about parallel-installability of different ABI versions or even Interpreter implementations, take PEP-3147 as an example. However, they don't know the mechanism all the various distros are going to apply. Thus they're installing a default /usr/bin/python binary which is not suffixed to not break everything. See below.
In fact, I'm not a big fan of using alternatives. Both versions aren't so easily switchable. I happen to agree with the can of worms thing.
The only thing needing u-a is the /usr/bin/python binary (and probably the man-page). Of course we ship a lot of Python software with she-banks like "#!/usr/bin/python" or "#!/usr/bin/env" python. Whenever one of those just accepts one specific major version, it needs adjustment. So I would like to u-a the "python" and "python3" package with the latter having a higher priority (thus being the default). Software that insists on the old Python-2.7 can be fixed to use #!/usr/bin/python2 instead. On the other hand, most upstream codebases actually run on both, so it's not going to be a big issue. Let me step back a bit from technical details. At some point we have to make Python3 the default. Some bumps are expected while doing so. Now is the right time to do it.
We could use update alternatives for nose and other python scripts, ...
We are already doing for most core packages already. It's unavoidable if you need to work with both major versions. Yes you can use virtualenv to achieve similar things, but we're a distro, no? -- Sascha Peilicke SUSE Linux GmbH, Maxfeldstr. 5, D-90409 Nuernberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer HRB 16746 (AG Nürnberg)