[Scons-users] Python 2.5 vs. Python 2.7

Bill Deegan bill at baddogconsulting.com
Wed Sep 23 20:29:46 EDT 2015


Rob,

I resemble that remark as a consultant.. ;)  ( baddogconsulting.com :)
If you can pastebin your myriad of warnings about deprecated usage perhaps
we (The SCons community) can assist you in your journey to warning-freedom!

-Bill

On Wed, Sep 23, 2015 at 7:40 AM, Rob Boehne <robb at datalogics.com> wrote:

> No, I didn¹t see any replies on the list.  I¹ve been able to make some of
> this work with both setups (scons 0.97 w/ Python 2.5 and scons 2.3.6 w/
> Python 2.7) by explicitly converting to a python list.
> For example:
>
> env[ŒEXCLUDEDOCLET¹] = [a for a in docletenv.Jar(Š)]
>
> As I read the documentation, there¹s a significant effort in the design of
> SCons to avoid requiring this sort of conversion.
>
> I¹ve made some progress getting things updated, but eventually gave up on
> the idea of using ancient SCons with Python 2.7 and updated to SCons
> 2.3.x.  Aside from generating a myriad of warnings about deprecated usage,
> most of it is working.
> It¹s a complex build, using SWIG to generate interfaces form C++ on Mac,
> Windows, Linux, AIX, HP-UX and Solaris with native compilers.  It¹s been
> working for 8 years in production, but also has been bit rotting for most
> of that time, maintained by consultants.
>
> Any insight the Gurus can provide will be appreciated.
>
> Thanks,
>
> Robert Boehne
>
> On 9/23/15, 6:31 AM, "Scons-users on behalf of Russel Winder"
> <scons-users-bounces at scons.org on behalf of russel at winder.org.uk> wrote:
>
> >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
> >
>
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20150923/2ccdf4ab/attachment.html>


More information about the Scons-users mailing list