From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id D9726E00D9E; Tue, 31 May 2016 03:45:57 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on yocto-www.yoctoproject.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] Received: from dan.rpsys.net (5751f4a1.skybroadband.com [87.81.244.161]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 90D85E00D99 for ; Tue, 31 May 2016 03:45:55 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by dan.rpsys.net (8.14.4/8.14.4/Debian-4.1ubuntu1) with ESMTP id u4VAjoOA006913; Tue, 31 May 2016 11:45:50 +0100 Received: from dan.rpsys.net ([127.0.0.1]) by localhost (dan.rpsys.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id ValcDRyE2BV4; Tue, 31 May 2016 11:45:50 +0100 (BST) Received: from hex ([192.168.3.34]) (authenticated bits=0) by dan.rpsys.net (8.14.4/8.14.4/Debian-4.1ubuntu1) with ESMTP id u4VAjlNs006910 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=NOT); Tue, 31 May 2016 11:45:48 +0100 Message-ID: <1464691547.19134.127.camel@linuxfoundation.org> From: Richard Purdie To: "toaster@yoctoproject.org" , "Avery, Brian" Date: Tue, 31 May 2016 11:45:47 +0100 X-Mailer: Evolution 3.16.5-1ubuntu3.1 Mime-Version: 1.0 Subject: virtualenv for toaster and python 3 X-BeenThere: toaster@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Web based interface for BitBake List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 May 2016 10:45:57 -0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit The move to python3 is unsurprisingly causing some issues in places. One of them is unfortunately the use of vritualenv, which as I understand it, toaster currently promotes as its preferred way of being run. The issue is that we need "python" to be python v2 but "python3" to be python v3. It seems with virtualenv you can either have python v2 or python v3 but not both. The python developers official party line is that "python" is v2 and "python3" is v3. There are some distros choosing not to do this (e.g. Arch Linux) but most are following the official recommendation and I think OE needs to follow the official recommendation too. Its likely OE will need to error with sanity test failures if the environment doesn't conform to this view of the world. Why do we need this? We have a mixture of code, some of it is ported to v3, some isn't. Whilst we're aiming to convert all of "our" code to python v3, even once we've done that, we can't easily change scripts that ship with the source code we build for example, or expect everyone to do that for all software they build. It may be virtualenv can be configured to not take over "python" but only "python3" but Ed/I haven't found the option, I'm no expert. The other alternative is to promote the use of something like "pip3 install 'Django>1.8,<1.9' --user" instead. Toaster doesn't need many modules and those it does need should be installable into the user's homedir using pip3. Whilst this means changing the documentation and taking a new approach, I think its the "least bad" solution we have right now. Obviously I'm open to other ideas but we really do need a way which allows mixed versions of python and virtualenv doesn't seem to work for this. Cheers, Richard