All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: "toaster@yoctoproject.org" <toaster@yoctoproject.org>,
	"Avery, Brian" <brian.avery@intel.com>
Subject: virtualenv for toaster and python 3
Date: Tue, 31 May 2016 11:45:47 +0100	[thread overview]
Message-ID: <1464691547.19134.127.camel@linuxfoundation.org> (raw)

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





             reply	other threads:[~2016-05-31 10:45 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-31 10:45 Richard Purdie [this message]
2016-05-31 14:09 ` virtualenv for toaster and python 3 Christopher Larson
2016-05-31 18:28   ` Brian Avery
2016-05-31 18:47     ` Brian Avery
2016-05-31 18:48       ` Christopher Larson
2016-06-01  9:27         ` Ed Bartosh
2016-06-01 17:24           ` Christopher Larson
2016-06-01 20:12             ` Ed Bartosh
2016-06-08 12:56               ` Michael Wood

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1464691547.19134.127.camel@linuxfoundation.org \
    --to=richard.purdie@linuxfoundation.org \
    --cc=brian.avery@intel.com \
    --cc=toaster@yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.