Update of /cvsroot/freevo/kaa/display
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23915

Modified Files:
        setup.py 
Log Message:
Add some better error reporting to evas detection code


Index: setup.py
===================================================================
RCS file: /cvsroot/freevo/kaa/display/setup.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** setup.py    10 Jul 2005 17:53:17 -0000      1.5
--- setup.py    16 Jul 2005 19:37:14 -0000      1.6
***************
*** 34,37 ****
--- 34,38 ----
  import os
  import sys
+ import popen2
  
  try:
***************
*** 84,90 ****
  evas_engines = ""
  if display.check_library('evas', '0.9.9.010'):
      out = "/tmp/a.out.%s" % os.getpid()
      cmd = "cc -x c - `evas-config --libs --cflags` -o %s" % out
!     os.popen(cmd + " &>/dev/null", "w").write('''
          #include <Evas.h>
          #include <stdio.h>
--- 85,93 ----
  evas_engines = ""
  if display.check_library('evas', '0.9.9.010'):
+     indent = re.compile("^", re.M)
      out = "/tmp/a.out.%s" % os.getpid()
      cmd = "cc -x c - `evas-config --libs --cflags` -o %s" % out
!     p = popen2.Popen4(cmd)
!     p.tochild.write('''
          #include <Evas.h>
          #include <stdio.h>
***************
*** 95,107 ****
          }
      ''')
!     for line in os.popen(out + " 2>/dev/null").readlines():
!         engine = line.strip()
!         if engine == "software_x11":
!             display.config("#define ENABLE_ENGINE_SOFTWARE_X11\n")
!             evas_engines += " software_x11"
!         elif engine == "gl_x11":
!             display.config("#define ENABLE_ENGINE_GL_X11\n")
!             evas_engines += " gl_x11"
!     os.unlink(out)
  
  if evas_engines == "":
--- 98,122 ----
          }
      ''')
!     p.tochild.close()
!     output = p.fromchild.read()
!     if os.waitpid(p.pid, 0)[1] != 0:
!         output = indent.sub("\t", output)
!         print "! Failed to compile evas test program:\n", output
!     else:
!         p = popen2.Popen4(out)
!         output = p.fromchild.read()
!         if os.waitpid(p.pid, 0)[1] != 0:
!             output = indent.sub("\t", output)
!             print "! Failed to run evas test program:\n", output
! 
!         for line in output.splitlines():
!             engine = line.strip()
!             if engine == "software_x11":
!                 display.config("#define ENABLE_ENGINE_SOFTWARE_X11\n")
!                 evas_engines += " software_x11"
!             elif engine == "gl_x11":
!                 display.config("#define ENABLE_ENGINE_GL_X11\n")
!                 evas_engines += " gl_x11"
!         os.unlink(out)
  
  if evas_engines == "":



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to