[Scons-users] TeX, PDF, VariantDir + children() and "no such file or directory: '.sconsign.dblite'"
Pawel Tomulik
ptomulik at meil.pw.edu.pl
Tue May 14 19:36:34 EDT 2013
W dniu 09.05.2013 22:55, Gary Oberbrunner pisze:
>
>
>
> On Thu, May 9, 2013 at 4:25 PM, Pawel Tomulik <ptomulik at meil.pw.edu.pl
> <mailto:ptomulik at meil.pw.edu.pl>> wrote:
>
> Hi,
>
> I have a simple project with three files:
> [...]
> # src/SConscript
> Import('env')
> dvi = env.DVI('foo.tex')
> pdf = env.PDF(dvi)
> print str(pdf[0].children()) # <- the pdf[0].children() causes the error
>
>
> I'm not 100% certain, but I think a node's children list is memoized,
> and asking for it during the SConscript-reading phase (before building
> has started) can cause trouble because asking for it causes it to be
> created, and since the build phase hasn't started the world isn't set up
> for that yet. (Note that .children is deliberately not part of the
> public API.)
>
> If you can arrange for it to be called as part of a build action, you
> might get a better result.
>
Ok, you're right.
Arrived at something like this:
#src/SConscript
Import('env')
def build_function(target, source, env):
print str(source[0].children())
return None
bld = Builder(action = build_function)
env.Append(BUILDERS = {'PrintChildren' : bld})
dvi = env.DVI('foo.tex')
pdf = env.PDF(dvi)
env.PrintChildren('fake', pdf)
and it prints the list of .children() correctly.
I still wonder, if/how I can determine safely the list of children of
given node while being in the "userspace". It should include sources
known ad hoc plus the result of LaTeX scanner, for example. The goal is
to pack these sources with some packaging Tool (Tar() e.g.). Or, maybe
there is another way to achieve this?
Thanks.
> --
> Gary
>
>
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> http://four.pairlist.net/mailman/listinfo/scons-users
>
--
Paweł Tomulik
More information about the Scons-users
mailing list