[Scons-users] FindFile returns on Cygwin always None
Philipp Kraus
philipp.kraus at flashpixx.de
Sun Oct 21 07:22:43 EDT 2012
On 2012-10-06 23:25:51 +0200, Gary Oberbrunner said:
>
>
> On Sat, Oct 6, 2012 at 4:31 AM, Philipp Kraus
> <philipp.kraus at flashpixx.de> wrote:
> On 2012-10-06 00:50:59 +0200, Kraus Philipp said:
>
> I'm using env.FindFile for searching some files:
>
> f = env.FindFile( "myfile", env["LIBPATH"])
>
> On Linux & OSX FindFile returns the correct values, but on Cygwin f is
> always None.
> I have tested Scons 2.2.0 & 2.1.0 on Cygwin.
>
> On "native" Windows like VS command line, FindFile works also. It seems to be
> only a problem in the Cygwin shell
>
> This works for me, using any Windows shell:
>
> % cat SConstruct
> env = Environment(LIBPATH=['subdir'])
> f = env.FindFile('myfile', env['LIBPATH'])
> print f
> % mkdir subdir
> % touch subdir/myfile
> % scons -Q
> subdir\myfile
> '.' is up to date.
> %
>
> Can you show exactly what's failing for you? I don't see why the type
> of shell you start SCons in should matter.
Hi Gary,
sorry for the late answer. I*'m using in my Cygwin the bash (/bin/bash)
and also on your little example the print
line returns always None although the myfile exists.
Scons return:
$ scons
scons: Reading SConscript files ...
--None
scons: done reading SConscript files.
scons: Building targets ...
scons: `.' is up to date.
scons: done building targets.
and the files:
$ find .
.
./.sconsign.dblite
./SConstruct
./subdir
./subdir/myfile
I have replace the env.FindFile with a own function, that runs
for root, dirs, files in os.walk(l) :
it is slower, but this returns the correct values
Phil
More information about the Scons-users
mailing list