[Scons-users] Glob
    Russel Winder 
    russel at winder.org.uk
       
    Sat Mar  8 14:32:08 EST 2014
    
    
  
On Sat, 2014-03-08 at 19:07 +0000, Andrew Featherstone wrote:
>      file_names = map(str, Glob('*.cc'))
>      file_names.remove('specialSourceFile.cc')
> If you wanted to then end up with a list of file nodes then
>      File(file_names)
This idea doesn't work as is.
I tried:
	map(str, Glob('*.cc')).remove('theFile.cc')
but that fails because str causes absolute paths to be generated.
	 map(str, Glob('*.cc')).remove(File('theFile.cc').abspath)
fails because the abspath of a File is in the build directory and I have
a variant build to get the compilation products out of the source
directory. Fortunately:
	map(str, Glob('*.cc')).remove(str(File('theFile.cc'))
appears to do the trick.
Sadly this must be classified as hacking, SCons build folk should not
have to do this sort of thing. There must be a better way.
-- 
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: 181 bytes
Desc: This is a digitally signed message part
Url : http://four.pairlist.net/pipermail/scons-users/attachments/20140308/57a406c9/attachment.pgp 
    
    
More information about the Scons-users
mailing list