[Scons-dev] scons running on py2.7 and py3.3

Russel Winder russel at winder.org.uk
Sat Sep 14 06:58:59 EDT 2013


On Thu, 2013-09-12 at 22:48 +0200, Dirk Bächle wrote:

> Hi Neal,

>

> thanks for all your efforts, trying to get SCons running with Python3. I

> created a diff of the (current trunk + 2to3) against your repo, please

> find the patch file attached.


Indeed, definite thanks to Neal for getting things moving.


> Looking at the changes, I think it might be worth a try, and compile the

> patch into a little fixer script of its own. Then we could continue with

> our basic development on Python v2.6 or v2.7, but easily create a

> Python3 version by applying our personal "fixer" and 2to3 on top of it.

>

> Just as an idea...


Everyone I know who has gone with the policy of 2.6/2.7 codebase with a
script to use 2to3 to create a Python 3 version has said "forget it it
doesn't work". Yes use 2to3 to get a comparator version, but always go
with a single codebase that works with 2.6, 2.7 and 3.3, i.e. use the
result of 2to3 to guide editing the codebase that still works under 2.6
and 2.7 as well as 3.3.

I am assuming we will put:

from __future__ import absolute_import, print_function, unicode_literals, division

as the first line in every file so that we write Python 3.3 that runs
under 2.6 and 2.7?

--
Russel.
=============================================================================
Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.winder at ekiga.net
41 Buckmaster Road m: +44 7770 465 077 xmpp: russel at winder.org.uk
London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
Url : <http://two.pairlist.net/pipermail/scons-dev/attachments/20130914/22010d7d/attachment.pgp>


More information about the Scons-dev mailing list