[Scons-users] changing the build directory

Kenny, Jason L jason.l.kenny at intel.com
Tue Mar 12 09:22:54 EDT 2013


Honestly I am not sure why we need to do anything more complex than a simple recursive=True|False argument.

A agree that Glob needs help. I added an object called Pattern in My addon Parts. I keep trying to use Glob but it just does not work for me in cases when there is some directory structure.

Jason

-----Original Message-----
From: scons-users-bounces at scons.org [mailto:scons-users-bounces at scons.org] On Behalf Of Russel Winder
Sent: Tuesday, March 12, 2013 6:42 AM
To: SCons users mailing list
Subject: Re: [Scons-users] changing the build directory

On Tue, 2013-03-12 at 11:08 +0100, Brady Johnson wrote:

> Ive seen several people on Stack Overflow ask about a recursive Glob.

> I too think it would be a great addition. Should it return a

> generator, or just a list of Nodes? Perhaps both would be useful.


I have to admit to not doing much with StackOverflow, the name says it all really ;-)

The emphasis in Python 3 is on being as lazy as possible so much more use of generators. If you want the data structure you ask for it explicitly. So for me:

RGlob('*.groovy')

would return a generator, and:

tuple(RGlob('*.groovy'))

would be the tuple derived from it.

An alternative design would be to use a recursive globbing syntax int he Glob and not have an RGlob at all. So, following Ant-like syntax:

Glob('**/*.groovy')

would be the recursive form. This has the advantage of only needing changes to the Glob system. I am beginning to prefer this solution.

--
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


More information about the Scons-users mailing list