开发者

scons does not find LaTeX DVI builder

开发者 https://www.devze.com 2022-12-19 18:00 出处:网络
I installed MacTex-2009 (from http://www.tug.org/mactex/2009/) and scons (1.2.0) on my iMac running Snow Leopard. Then I tested the installation with a trivial SConstruct file:

I installed MacTex-2009 (from http://www.tug.org/mactex/2009/) and scons (1.2.0) on my iMac running Snow Leopard. Then I tested the installation with a trivial SConstruct file:

    env = Environment()
    dvi = env.DVI(target="hello.dvi",source="hello.tex")

and an obvious LaTeX "hello.tex" file. When I execute "scons", I get:

    scons: Reading SConscript files ...
    AttributeError: SConsEnvironment instance has no attribute 'DVI':
      File "/Users/tsf/temp/SConstruct", line 2:
        dvi = env.DVI(target="hello.dvi",source开发者_开发问答="hello.tex")

After the first line I added the command:

    print str(env["BUILDERS"])

and I could see that the DVI builder does not appear. I am using the same files on a Linux machine (different TeX installation) and it works.

Any hints?


I solved the problem already. It seems that scons does not find MacTex-2009, so that the SConstruct file should look like:

    import os
    env = Environment(ENV = os.environ)
    dvi = env.DVI(target="hello.dvi",source="hello.tex")

Now it works!

-- Tsf

0

精彩评论

暂无评论...
验证码 换一张
取 消