Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Oct 2016 12:04:27 +0200
From:      "Vlad K." <vlad-fbsd@acheronmedia.com>
To:        koobs@freebsd.org
Cc:        Ruslan Makhmatkhanov <rm@freebsd.org>, python <python@freebsd.org>, Kubilay Kocak <koobs.freebsd@gmail.com>
Subject:   Re: Introducing python3 into user system
Message-ID:  <d26ab706fbdee81e45046a2c724a132d@acheronmedia.com>
In-Reply-To: <883cfb37-3946-aa2c-21d2-73a21ea3e365@FreeBSD.org>
References:  <c7c2d8eb-e512-b118-c432-25ca3ee094db@FreeBSD.org> <883cfb37-3946-aa2c-21d2-73a21ea3e365@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi all!


On 2016-10-17 09:47, Kubilay Kocak wrote:
> On 17/10/2016 6:22 AM, Ruslan Makhmatkhanov wrote:
> 
>> - if port has a build dependency upon python and it can be built
>> both with python2 and python3, force it to build with python3 - if
>> some standalone application can be running both with python2 and
>> python3 and it have equivalent python3 dependencies, force it to be
>> run with python3

This can be achieved now by setting DEFAULT_VERSIONS= python=3 
python3=3.5. See https://wiki.freebsd.org/DEFAULT_VERSIONS

And if I misunderstood you correctly and you meant force it via port 
itself, I don't think we have a mechanism for that and even if we did, 
that'd be very bad.

One such problem I've noticed is with shared dependencies. If port X can 
work with 3, and port Y can only work with 2, and both have a common 
dependency Z which can run both 2 and 3, Z won't be built for both, 
it'll be built for DEFAULT_VERSION version, and if that's 3, it spells 
trouble for Y. It'll build fine, but Y will fail at runtime.

Case in point was building py-sphinx and saltstack with Py3.5 set as 
default. They both have a dependency that broke sphinx, iirc.

To fix this we desperately need variants. 
https://reviews.freebsd.org/D5563


>> We also need to explicitly mark python2-only ports to simplify
>> switching to python3 as default at some point of time.

Definitely. I've started doing that, and caught some. weechat was one of 
them which has been fixed now. But, because of my build server 
reorganization I had to stop with that for some time and will pick it up 
again with a permanent, bi-weekly (twice a week) poudriere build of ALL 
ports that USE= python, with a public poudriere status page so we can 
track how it goes.



>> What you guys think about? If there is general consensus, we may
>> enforce this via Porters Handbook.

I'm not sure the PHB is the right place. When I get the continuous 
poudriere build going, I'll post to the mailing lists announcing it, 
with an intention to pretty please let's switch to py3 as soon as 
possible. Also see next:


> I suggest we document something like a 'Road to Python 3 as Default'
> page in the Python/ wiki outlining the goal (with timelines),
> motivation, potential problems and possible alternative methods. Kind 
> of
> like a Python PEP.

Definitely. I was thinking about that, inspired by Bernard's LibreSSL 
list of ports that fail, to have a list of ports that:

a) Have USE= python but fail on 3
b) Have USE= python:2 but are actually supported on 3


But I need to get that poudriere running with a public status page for 
that.


-- 

Vlad K.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?d26ab706fbdee81e45046a2c724a132d>