Only add DISPLAY to the SCons build environment if the user has set it
authorW. Trevor King <wking@drexel.edu>
Wed, 28 Apr 2010 21:11:57 +0000 (17:11 -0400)
committerW. Trevor King <wking@drexel.edu>
Wed, 28 Apr 2010 21:11:57 +0000 (17:11 -0400)
tex/src/SConscript

index ce08fd46a00ad6344fc77eb51fda10396278406c..550974d2a2b2990814b336b23d721dcdfa097ec4 100644 (file)
@@ -8,11 +8,13 @@ from site_cons.site_tools import asymptote, gnuplot
 env = Environment(ENV={
     'PATH':['/usr/local/bin', '/opt/bin', '/bin', '/usr/bin'],
     'HOME':os.path.expanduser('~'),
-    'DISPLAY':os.environ['DISPLAY'],
     'PYMOL_PATH':'/usr/lib/python2.6/site-packages/pymol',
     'PYMOL_DATA':'/usr/share/pymol/data',
     'PYMOL_SCRIPTS':'/usr/share/pymol/scripts',
     })
+if 'DISPLAY' in os.environ:
+   env['ENV']['DISPLAY'] = os.environ['DISPLAY']
+
 asymptote.generate(env)
 gnuplot.generate(env)