[Scons-users] Python 2.5 vs. Python 2.7
Russel Winder
russel at winder.org.uk
Wed Sep 23 07:31:33 EDT 2015
Did anyone get back to you on this?
On Tue, 2015-07-28 at 21:07 +0000, Rob Boehne wrote:
> Scons users,
>
> I have inherited a large and old SCons build that is virtualenv'd to
> use Python 2.5 and scons 0.97.
> I'm *trying* to get it to work in both python 2.5 and 2.7 before
> updating the version of scons (and other tools) that it uses.
> Seems trivial, but alas.
> The snippet below works in Python 2.5, but throws an error in Python
> 2.7 on the very last line:
>
> # Exclude doclet into Tools jar
> # See http://java.sun.com/j2se/javadoc/excludedoclet/docs/excludedocl
> et.html for documentation on this
> docletenv = env.Clone(JAVACFLAGS='-classpath
> "$JDKROOT/lib/tools.jar"')
> excludejava = docletenv.Java('$BUILDDIR/excludedoclet/classes',
> '#Tools/excludedoclet/src')
> env['EXCLUDEDOCLET'] = docletenv.Jar('$BUILDDIR/Tools.jar',
> excludejava, JARCHDIR=excludejava[0].dir.path)
>
>
> > scons
> scons: Reading SConscript files ...
> scons: Reading SConscript files ...
>
> scons: *** attempted to add a non-Node as source of build\win-x86
> -32\Debug\Tools.jar:
> ['build\\win-x86
> -32\\Debug\\excludedoclet\\classes\\ExcludeDoclet.class'] is a <class
> 'SCons.Node.NodeList'>, not a Node
> File "C:\Users\robb\Development\apdfl-win\DLE\SConstruct", line 1753,
> in <module>
> Build completed with status 2
>
> The difference is that the second line produces object "excludejava"
> as a UserList in Python 2.5, and produces a NodeList in python 2.7,
> both of length 1.
>
> What would be the safest, most canonical way to rewrite these three
> lines to make it happy with both interpreters?
>
> Thanks,
>
> Robert Boehne
> SCons novice
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
--
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: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20150923/5168d11b/attachment.pgp>
More information about the Scons-users
mailing list