Hi, from this and some of the discussion above I see that the situation in NixOS may be a little different to most other distros.
I agree that you probably don't want to have to patch all shebangs manually, but making python2 take priority over python3 in the case of a collision seems like a good solution. Anyway I really just wanted to raise the point for discussion, having done that I can go back to lurking on this list! :) Thanks, Richard On Tue, Feb 14, 2017 at 01:17:07PM +0100, Freddy Rietdijk wrote: > Sure. As I said the PEP doesn't provide any method for distributions that > would already like to make the switch. In an ideal scenario all developers > would update their requirements/shebangs. That just doesn't happen. > > What we perhaps ought to do is instead fix all those shebangs ourselves, > before we run `patchShebang/wrapPythonPrograms`. Considering the amount of > (boring) work that takes I don't see anyone stepping up doing that. > Therefore, symlinking `python` *also* to `python3` is a pragmatic solution. > > As Moritz described, we already pass a specific interpreter as a buildInput > to a package. Therefore, there shouldn't be any issues with our programs. > The only issue that could arise is when one installs both interpreters in > one profile. In that case a collision occurs. Maybe we should set a > priority here so that in that case `python` will refer to `python2`. > > > > > > > > > > > > > > On Tue, Feb 14, 2017 at 12:11 PM, Richard Ipsum <richardip...@fastmail.co.uk > > wrote: > > > On Tue, Feb 14, 2017 at 11:29:32AM +0100, Freddy Rietdijk wrote: > > > Hi Richard, > > > > > > Thanks for sharing the PEP. > > > > > > Actually, we, or at least I, chose to ignore that PEP, and so we do > > > symlink. > > > > > > > Out of interest can I ask what the rationale for that decision is? > > > > I'd like to try to persuade you not to symlink python to python3, > > because doing so potentially breaks existing python2 programs. > > > > But since I'm not an active contributor to this project it's not my place > > to argue here really. :) > > > > Thanks, > > Richard > > > > [snip] > > > > > > > > > On Tue, Feb 14, 2017 at 10:40 AM, Richard Ipsum < > > richardip...@fastmail.co.uk > > > > wrote: > > > > > > > On Mon, Feb 13, 2017 at 10:08:07AM +0100, Freddy Rietdijk wrote: > > > > > Hi, > > > > > > > > > > As you may be aware the plan is to change to Python 3.5 as default > > for > > > > > 17.03. There were a couple of things that had to be done, and I think > > > > we're > > > > > ready now to make the change. Packages that require Python 2 are now > > > > pinned > > > > > to do so. > > > > > > > > > > Now, obviously I haven't been able to test all packages myself, but > > > > judging > > > > > from what Hydra reports and from working from the `python3` branch I > > > > don't > > > > > expect any major issues. > > > > > > > > > > The Python 2.7 interpreter had quite some patches, among one to make > > the > > > > > interpreter and Python packages more deterministic. I say more, > > because > > > > > they're not fully deterministic yet. I have some patches lining up > > for > > > > the > > > > > 3.5 interpreter to improvement determinism there as well. > > > > > > > > > > In any case, I would like to merge this as soon as possible. Any > > > > objections? > > > > > > > > > > Freddy > > > > > > > > Hi, I'm not really an active contributor here but I follow NixOS > > because > > > > I think it's a really cool project. > > > > > > > > Am I to understand that NixOS is considering replacing the python2 > > > > interpreter with the python3 interpreter, as arch did? > > > > > > > > If that's the case it may be worth considering this pep[1] first. > > > > > > > > If I've misunderstood and there's no intention to symlink 'python' to > > > > 'python3' > > > > then please ignore this. :) > > > > > > > > [1]: http://legacy.python.org/dev/peps/pep-0394/#id5 > > > > _______________________________________________ > > > > nix-dev mailing list > > > > nix-dev@lists.science.uu.nl > > > > http://lists.science.uu.nl/mailman/listinfo/nix-dev > > > > > > _______________________________________________ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev