[Scons-users] TeX, PDF, VariantDir + children() and "no such file or directory: '.sconsign.dblite'"

Pawel Tomulik ptomulik at meil.pw.edu.pl
Thu May 9 22:24:17 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:

>

> SConstruct

> src/SConscript

> src/foo.tex

>

> It uses VariantDir and DVI + PDF builders to compile LaTeX document. The

> contents of the files are:

>

> # SConsctruct

> env = Environment(tools = ['latex','dvipdf'])

> VariantDir('build', 'src', duplicate = 1)

> SConscript('build/SConscript', exports = 'env')

>

>

> # 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.)

>


Ok, is there a public API method with similar purpose? I need a list of
children for given target node. Is Environment.FindSourceFiles() a part
of public API? (it seems to have similar purpose)


> If you can arrange for it to be called as part of a build action, you

> might get a better result.

>


I don't know what do you mean? Playing around emitters, scanners and
such things?


**Some additional observations:**

The list of children actually appears on SCons output and all targets
get built correctly, the exception is thrown at the very end after all
the job is done.

I've tried env.FindSourceFiles(pdf[0]) and it has same effect (error).

All seems to work well with other builders (I've tried this with
Object/Program for example). Seems like it is specific to DVI/PDF builder.

The error seems to appear only when I use the above sequence of
builders, that is DVI (*.tex -> *.dvi) and then PDF (*.dvi -> *.pdf).
When used separately, the error disappears.
The following snippet, for example, does not trigger any errors:


Import('env')
dvi = env.DVI('foo.tex')
print str(dvi[0].children())
pdf = env.PDF('foo.dvi')


Also, if I use only PDF to convert 'foo.dvi' -> 'foo.pdf' without prior
compilation of 'foo.tex' -> 'foo.pdf' by DVI builder, it all works well.

Compiling without VariantDir does not trigger such errors.

Any ideas?

Best regards!
--
Paweł Tomulik



More information about the Scons-users mailing list